Skip to content

Commit

Permalink
Bump to 0.62.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Feb 24, 2022
1 parent c7dbc42 commit 560ee81
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo"
version = "0.61.0"
version = "0.62.0"
edition = "2021"
license = "MIT OR Apache-2.0"
homepage = "https://crates.io"
Expand Down
12 changes: 0 additions & 12 deletions src/cargo/core/compiler/build_context/target_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ pub struct TargetInfo {
pub rustdocflags: Vec<String>,
/// Whether or not rustc supports the `-Csplit-debuginfo` flag.
pub supports_split_debuginfo: bool,
/// Whether or not rustc supports the `--json future-incompat` flag.
pub supports_json_future_incompat: bool,
}

/// Kind of each file generated by a Unit, part of `FileType`.
Expand Down Expand Up @@ -181,15 +179,6 @@ impl TargetInfo {
)
.is_ok();

let supports_json_future_incompat = rustc
.cached_output(
process
.clone()
.args(&["--error-format", "json", "--json", "future-incompat"]),
extra_fingerprint,
)
.is_ok();

process.arg("--print=sysroot");
process.arg("--print=cfg");

Expand Down Expand Up @@ -264,7 +253,6 @@ impl TargetInfo {
)?,
cfg,
supports_split_debuginfo,
supports_json_future_incompat,
})
}

Expand Down
18 changes: 4 additions & 14 deletions src/cargo/core/compiler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ fn rustdoc(cx: &mut Context<'_, '_>, unit: &Unit) -> CargoResult<Work> {
rustdoc.arg("--cfg").arg(&format!("feature=\"{}\"", feat));
}

add_error_format_and_color(cx, &mut rustdoc, unit);
add_error_format_and_color(cx, &mut rustdoc);
add_allow_features(cx, &mut rustdoc);

if let Some(args) = cx.bcx.extra_args_for(unit) {
Expand Down Expand Up @@ -821,19 +821,9 @@ fn add_features(cx: &Context<'_, '_>, cmd: &mut ProcessBuilder, unit: &Unit) {
/// intercepting messages like rmeta artifacts, etc. rustc includes a
/// "rendered" field in the JSON message with the message properly formatted,
/// which Cargo will extract and display to the user.
fn add_error_format_and_color(cx: &Context<'_, '_>, cmd: &mut ProcessBuilder, unit: &Unit) {
fn add_error_format_and_color(cx: &Context<'_, '_>, cmd: &mut ProcessBuilder) {
cmd.arg("--error-format=json");
let mut json = String::from("--json=diagnostic-rendered-ansi,artifacts");
if cx
.bcx
.target_data
.info(unit.kind)
.supports_json_future_incompat
{
// Emit a future-incompat report (when supported by rustc), so we can report
// future-incompat dependencies to the user
json.push_str(",future-incompat");
}
let mut json = String::from("--json=diagnostic-rendered-ansi,artifacts,future-incompat");

match cx.bcx.build_config.message_format {
MessageFormat::Short | MessageFormat::Json { short: true, .. } => {
Expand Down Expand Up @@ -895,7 +885,7 @@ fn build_base_args(
edition.cmd_edition_arg(cmd);

add_path_args(bcx.ws, unit, cmd);
add_error_format_and_color(cx, cmd, unit);
add_error_format_and_color(cx, cmd);
add_allow_features(cx, cmd);

let mut contains_dy_lib = false;
Expand Down

0 comments on commit 560ee81

Please sign in to comment.