From 997bf3fffc8779c241826d8a0df9da6cd8833de0 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Sat, 4 Dec 2021 15:17:53 -0500 Subject: [PATCH 1/7] Stabilize future-incompat-report Depends on https://github.com/rust-lang/rust/pull/91535 --- src/bin/cargo/commands/report.rs | 4 -- src/cargo/core/compiler/future_incompat.rs | 3 - src/cargo/core/compiler/mod.rs | 7 +- src/cargo/core/features.rs | 8 ++- src/cargo/util/command_prelude.rs | 13 +--- tests/testsuite/future_incompat_report.rs | 79 +++++++--------------- 6 files changed, 35 insertions(+), 79 deletions(-) diff --git a/src/bin/cargo/commands/report.rs b/src/bin/cargo/commands/report.rs index cf2bbf91fc9..34a79bb8f39 100644 --- a/src/bin/cargo/commands/report.rs +++ b/src/bin/cargo/commands/report.rs @@ -1,5 +1,4 @@ use crate::command_prelude::*; -use anyhow::anyhow; use cargo::core::compiler::future_incompat::{OnDiskReports, REPORT_PREAMBLE}; use cargo::drop_println; @@ -24,9 +23,6 @@ pub fn cli() -> App { } pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult { - if !config.nightly_features_allowed { - return Err(anyhow!("`cargo report` can only be used on the nightly channel").into()); - } match args.subcommand() { ("future-incompatibilities", Some(args)) => report_future_incompatibilies(config, args), (cmd, _) => panic!("unexpected command `{}`", cmd), diff --git a/src/cargo/core/compiler/future_incompat.rs b/src/cargo/core/compiler/future_incompat.rs index f3387ba181c..f201456594a 100644 --- a/src/cargo/core/compiler/future_incompat.rs +++ b/src/cargo/core/compiler/future_incompat.rs @@ -321,9 +321,6 @@ pub fn save_and_display_report( bcx: &BuildContext<'_, '_>, per_package_future_incompat_reports: &[FutureIncompatReportPackage], ) { - if !bcx.config.cli_unstable().future_incompat_report { - return; - } let should_display_message = match bcx.config.future_incompat_config() { Ok(config) => config.should_display_message(), Err(e) => { diff --git a/src/cargo/core/compiler/mod.rs b/src/cargo/core/compiler/mod.rs index cb9b3c681ab..1ab303d3f81 100644 --- a/src/cargo/core/compiler/mod.rs +++ b/src/cargo/core/compiler/mod.rs @@ -798,6 +798,9 @@ fn add_error_format_and_color(cx: &Context<'_, '_>, cmd: &mut ProcessBuilder, pi // to emit a message that cargo will intercept. json.push_str(",artifacts"); } + // Always emit a future-incompat report, so we can report + // future-incompat dependencies to the user + json.push_str(",future-incompat"); match cx.bcx.build_config.message_format { MessageFormat::Short | MessageFormat::Json { short: true, .. } => { @@ -1022,10 +1025,6 @@ fn build_base_args( .env("RUSTC_BOOTSTRAP", "1"); } - if bcx.config.cli_unstable().future_incompat_report { - cmd.arg("-Z").arg("emit-future-incompat-report"); - } - // Add `CARGO_BIN_` environment variables for building tests. if unit.target.is_test() || unit.target.is_bench() { for bin_target in unit diff --git a/src/cargo/core/features.rs b/src/cargo/core/features.rs index 27da65247b2..9016038ddbf 100644 --- a/src/cargo/core/features.rs +++ b/src/cargo/core/features.rs @@ -637,7 +637,6 @@ unstable_cli_options!( doctest_in_workspace: bool = ("Compile doctests with paths relative to the workspace root"), doctest_xcompile: bool = ("Compile and run doctests for non-host target using runner config"), dual_proc_macros: bool = ("Build proc-macros for both the host and the target"), - future_incompat_report: bool = ("Enable creation of a future-incompat report for all dependencies"), features: Option> = (HIDDEN), jobserver_per_rustc: bool = (HIDDEN), minimal_versions: bool = ("Resolve minimal dependency versions instead of maximum"), @@ -705,6 +704,9 @@ const STABILIZED_NAMED_PROFILES: &str = "The named-profiles feature is now alway See https://doc.rust-lang.org/nightly/cargo/reference/profiles.html#custom-profiles \ for more information"; +const STABILIZED_FUTURE_INCOMPAT_REPORT: &str = + "The future-incompat-report feature is now always enabled."; + fn deserialize_build_std<'de, D>(deserializer: D) -> Result>, D::Error> where D: serde::Deserializer<'de>, @@ -894,7 +896,9 @@ impl CliUnstable { "extra-link-arg" => stabilized_warn(k, "1.56", STABILIZED_EXTRA_LINK_ARG), "configurable-env" => stabilized_warn(k, "1.56", STABILIZED_CONFIGURABLE_ENV), "patch-in-config" => stabilized_warn(k, "1.56", STABILIZED_PATCH_IN_CONFIG), - "future-incompat-report" => self.future_incompat_report = parse_empty(k, v)?, + "future-incompat-report" => { + stabilized_warn(k, "1.59.0", STABILIZED_FUTURE_INCOMPAT_REPORT) + } _ => bail!("unknown `-Z` flag specified: {}", k), } diff --git a/src/cargo/util/command_prelude.rs b/src/cargo/util/command_prelude.rs index 066e900ad46..84d09d1f8d2 100644 --- a/src/cargo/util/command_prelude.rs +++ b/src/cargo/util/command_prelude.rs @@ -233,7 +233,7 @@ pub trait AppExt: Sized { fn arg_future_incompat_report(self) -> Self { self._arg(opt( "future-incompat-report", - "Outputs a future incompatibility report at the end of the build (unstable)", + "Outputs a future incompatibility report at the end of the build", )) } } @@ -512,17 +512,6 @@ pub trait ArgMatchesExt { .cli_unstable() .fail_if_stable_opt("--unit-graph", 8002)?; } - if build_config.future_incompat_report { - config - .cli_unstable() - .fail_if_stable_opt("--future-incompat-report", 9241)?; - - if !config.cli_unstable().future_incompat_report { - anyhow::bail!( - "Usage of `--future-incompat-report` requires `-Z future-incompat-report`" - ) - } - } let opts = CompileOptions { build_config, diff --git a/tests/testsuite/future_incompat_report.rs b/tests/testsuite/future_incompat_report.rs index 8c10f06f0a3..c6cb2ffd324 100644 --- a/tests/testsuite/future_incompat_report.rs +++ b/tests/testsuite/future_incompat_report.rs @@ -25,7 +25,7 @@ fn simple_project() -> Project { } #[cargo_test] -fn no_output_on_stable() { +fn output_on_stable() { if !is_nightly() { // -Zfuture-incompat-test requires nightly (permanently) return; @@ -33,39 +33,23 @@ fn no_output_on_stable() { let p = simple_project(); p.cargo("check") - // Even though rustc emits the report, cargo ignores it without -Z. .env("RUSTFLAGS", "-Zfuture-incompat-test") .with_stderr_contains(FUTURE_OUTPUT) - .with_stderr_does_not_contain("[..]cargo report[..]") + .with_stderr_contains("[..]cargo report[..]") .run(); } +// This feature is stable, and should not be gated #[cargo_test] -fn gate_future_incompat_report() { +fn no_gate_future_incompat_report() { let p = simple_project(); p.cargo("build --future-incompat-report") - .with_stderr_contains("error: the `--future-incompat-report` flag is unstable[..]") - .with_status(101) - .run(); - - // Both `-Z future-incompat-report` and `-Z unstable-opts` are required - p.cargo("build --future-incompat-report -Z future-incompat-report") - .masquerade_as_nightly_cargo() - .with_stderr_contains("error: the `--future-incompat-report` flag is unstable[..]") - .with_status(101) - .run(); - - p.cargo("build --future-incompat-report -Z unstable-options") - .masquerade_as_nightly_cargo() - .with_stderr_contains( - "error: Usage of `--future-incompat-report` requires `-Z future-incompat-report`", - ) - .with_status(101) + .with_status(0) .run(); p.cargo("report future-incompatibilities --id foo") - .with_stderr_contains("error: `cargo report` can only be used on the nightly channel") + .with_stderr_contains("error: no reports are currently available") .with_status(101) .run(); } @@ -83,8 +67,7 @@ fn test_zero_future_incompat() { .build(); // No note if --future-incompat-report is not specified. - p.cargo("build -Z future-incompat-report") - .masquerade_as_nightly_cargo() + p.cargo("build") .env("RUSTFLAGS", "-Zfuture-incompat-test") .with_stderr( "\ @@ -94,8 +77,7 @@ fn test_zero_future_incompat() { ) .run(); - p.cargo("build --future-incompat-report -Z unstable-options -Z future-incompat-report") - .masquerade_as_nightly_cargo() + p.cargo("build --future-incompat-report") .env("RUSTFLAGS", "-Zfuture-incompat-test") .with_stderr( "\ @@ -117,8 +99,7 @@ fn test_single_crate() { for command in &["build", "check", "rustc", "test"] { let check_has_future_compat = || { - p.cargo(command).arg("-Zfuture-incompat-report") - .masquerade_as_nightly_cargo() + p.cargo(command) .env("RUSTFLAGS", "-Zfuture-incompat-test") .with_stderr_contains(FUTURE_OUTPUT) .with_stderr_contains("warning: the following packages contain code that will be rejected by a future version of Rust: foo v0.0.0 [..]") @@ -147,8 +128,6 @@ frequency = 'never' ", ); p.cargo(command) - .arg("-Zfuture-incompat-report") - .masquerade_as_nightly_cargo() .env("RUSTFLAGS", "-Zfuture-incompat-test") .with_stderr_contains(FUTURE_OUTPUT) .with_stderr_does_not_contain("[..]rejected[..]") @@ -156,8 +135,7 @@ frequency = 'never' .run(); // Check that passing `--future-incompat-report` overrides `frequency = 'never'` - p.cargo(command).arg("-Zfuture-incompat-report").arg("-Zunstable-options").arg("--future-incompat-report") - .masquerade_as_nightly_cargo() + p.cargo(command).arg("--future-incompat-report") .env("RUSTFLAGS", "-Zfuture-incompat-test") .with_stderr_contains(FUTURE_OUTPUT) .with_stderr_contains("warning: the following packages contain code that will be rejected by a future version of Rust: foo v0.0.0 [..]") @@ -197,8 +175,7 @@ fn test_multi_crate() { .build(); for command in &["build", "check", "rustc", "test"] { - p.cargo(command).arg("-Zfuture-incompat-report") - .masquerade_as_nightly_cargo() + p.cargo(command) .env("RUSTFLAGS", "-Zfuture-incompat-test") .with_stderr_does_not_contain(FUTURE_OUTPUT) .with_stderr_contains("warning: the following packages contain code that will be rejected by a future version of Rust: first-dep v0.0.1, second-dep v0.0.2") @@ -209,23 +186,20 @@ fn test_multi_crate() { .with_stderr_does_not_contain("[..]-p[..]") .run(); - p.cargo(command).arg("-Zunstable-options").arg("-Zfuture-incompat-report").arg("--future-incompat-report") - .masquerade_as_nightly_cargo() + p.cargo(command).arg("--future-incompat-report") .env("RUSTFLAGS", "-Zfuture-incompat-test") .with_stderr_contains("warning: the following packages contain code that will be rejected by a future version of Rust: first-dep v0.0.1, second-dep v0.0.2") .with_stderr_contains(" - first-dep:0.0.1") .with_stderr_contains(" - second-dep:0.0.2") .run(); - p.cargo("report future-incompatibilities").arg("--package").arg("first-dep:0.0.1").arg("-Zunstable-options").arg("-Zfuture-incompat-report") - .masquerade_as_nightly_cargo() + p.cargo("report future-incompatibilities").arg("--package").arg("first-dep:0.0.1") .with_stdout_contains("The package `first-dep v0.0.1` currently triggers the following future incompatibility lints:") .with_stdout_contains(FUTURE_OUTPUT) .with_stdout_does_not_contain("[..]second-dep-0.0.2/src[..]") .run(); - p.cargo("report future-incompatibilities").arg("--package").arg("second-dep:0.0.2").arg("-Zunstable-options").arg("-Zfuture-incompat-report") - .masquerade_as_nightly_cargo() + p.cargo("report future-incompatibilities").arg("--package").arg("second-dep:0.0.2") .with_stdout_contains("The package `second-dep v0.0.2` currently triggers the following future incompatibility lints:") .with_stdout_contains(FUTURE_OUTPUT) .with_stdout_does_not_contain("[..]first-dep-0.0.1/src[..]") @@ -234,9 +208,8 @@ fn test_multi_crate() { // Test that passing the correct id via '--id' doesn't generate a warning message let output = p - .cargo("build -Z future-incompat-report") + .cargo("build") .env("RUSTFLAGS", "-Zfuture-incompat-test") - .masquerade_as_nightly_cargo() .exec_with_output() .unwrap(); @@ -256,16 +229,14 @@ fn test_multi_crate() { // Strip off the trailing '`' included in the output let id: String = id.chars().take_while(|c| *c != '`').collect(); - p.cargo(&format!("report future-incompatibilities -Z future-incompat-report --id {}", id)) - .masquerade_as_nightly_cargo() + p.cargo(&format!("report future-incompatibilities --id {}", id)) .with_stdout_contains("The package `first-dep v0.0.1` currently triggers the following future incompatibility lints:") .with_stdout_contains("The package `second-dep v0.0.2` currently triggers the following future incompatibility lints:") .run(); // Test without --id, and also the full output of the report. let output = p - .cargo("report future-incompat -Z future-incompat-report") - .masquerade_as_nightly_cargo() + .cargo("report future-incompat") .exec_with_output() .unwrap(); let output = std::str::from_utf8(&output.stdout).unwrap(); @@ -305,17 +276,17 @@ fn color() { let p = simple_project(); - p.cargo("check -Zfuture-incompat-report") + p.cargo("check") .env("RUSTFLAGS", "-Zfuture-incompat-test") .masquerade_as_nightly_cargo() .run(); - p.cargo("report future-incompatibilities -Z future-incompat-report") + p.cargo("report future-incompatibilities") .masquerade_as_nightly_cargo() .with_stdout_does_not_contain("[..]\x1b[[..]") .run(); - p.cargo("report future-incompatibilities -Z future-incompat-report") + p.cargo("report future-incompatibilities") .masquerade_as_nightly_cargo() .env("CARGO_TERM_COLOR", "always") .with_stdout_contains("[..]\x1b[[..]") @@ -331,24 +302,24 @@ fn bad_ids() { let p = simple_project(); - p.cargo("report future-incompatibilities -Z future-incompat-report --id 1") + p.cargo("report future-incompatibilities --id 1") .masquerade_as_nightly_cargo() .with_status(101) .with_stderr("error: no reports are currently available") .run(); - p.cargo("check -Zfuture-incompat-report") + p.cargo("check") .env("RUSTFLAGS", "-Zfuture-incompat-test") .masquerade_as_nightly_cargo() .run(); - p.cargo("report future-incompatibilities -Z future-incompat-report --id foo") + p.cargo("report future-incompatibilities --id foo") .masquerade_as_nightly_cargo() .with_status(1) .with_stderr("error: Invalid value: could not parse `foo` as a number") .run(); - p.cargo("report future-incompatibilities -Z future-incompat-report --id 7") + p.cargo("report future-incompatibilities --id 7") .masquerade_as_nightly_cargo() .with_status(101) .with_stderr( @@ -426,7 +397,7 @@ big_update v1.0.0 has the following newer versions available: 2.0.0 with_updates v1.0.0 has the following newer versions available: 1.0.1, 1.0.2, 3.0.1 "; - p.cargo("check -Zfuture-incompat-report -Zunstable-options --future-incompat-report") + p.cargo("check --future-incompat-report") .masquerade_as_nightly_cargo() .env("RUSTFLAGS", "-Zfuture-incompat-test") .with_stderr_contains(update_message) From c2332dc0bac67315e3032734c046b50ae78b5776 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Sun, 5 Dec 2021 13:27:57 -0600 Subject: [PATCH 2/7] Detect if rustc supports '--json future-incompat' --- .../compiler/build_context/target_info.rs | 10 ++++++++ src/cargo/core/compiler/mod.rs | 24 ++++++++++++++----- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/src/cargo/core/compiler/build_context/target_info.rs b/src/cargo/core/compiler/build_context/target_info.rs index f215014edc7..588c4cb4691 100644 --- a/src/cargo/core/compiler/build_context/target_info.rs +++ b/src/cargo/core/compiler/build_context/target_info.rs @@ -47,6 +47,8 @@ pub struct TargetInfo { pub rustdocflags: Vec, /// 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`. @@ -179,6 +181,13 @@ impl TargetInfo { ) .is_ok(); + let supports_json_future_incompat = rustc + .cached_output( + process.clone().arg("--json").arg("future-incompat"), + extra_fingerprint, + ) + .is_ok(); + process.arg("--print=sysroot"); process.arg("--print=cfg"); @@ -253,6 +262,7 @@ impl TargetInfo { )?, cfg, supports_split_debuginfo, + supports_json_future_incompat, }) } diff --git a/src/cargo/core/compiler/mod.rs b/src/cargo/core/compiler/mod.rs index 1ab303d3f81..2c1b6c32f58 100644 --- a/src/cargo/core/compiler/mod.rs +++ b/src/cargo/core/compiler/mod.rs @@ -641,7 +641,7 @@ fn rustdoc(cx: &mut Context<'_, '_>, unit: &Unit) -> CargoResult { rustdoc.arg("--cfg").arg(&format!("feature=\"{}\"", feat)); } - add_error_format_and_color(cx, &mut rustdoc, false); + add_error_format_and_color(cx, &mut rustdoc, unit, false); add_allow_features(cx, &mut rustdoc); if let Some(args) = cx.bcx.extra_args_for(unit) { @@ -790,7 +790,12 @@ fn add_allow_features(cx: &Context<'_, '_>, cmd: &mut ProcessBuilder) { /// 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, pipelined: bool) { +fn add_error_format_and_color( + cx: &Context<'_, '_>, + cmd: &mut ProcessBuilder, + unit: &Unit, + pipelined: bool, +) { cmd.arg("--error-format=json"); let mut json = String::from("--json=diagnostic-rendered-ansi"); if pipelined { @@ -798,9 +803,16 @@ fn add_error_format_and_color(cx: &Context<'_, '_>, cmd: &mut ProcessBuilder, pi // to emit a message that cargo will intercept. json.push_str(",artifacts"); } - // Always emit a future-incompat report, so we can report - // future-incompat dependencies to the user - json.push_str(",future-incompat"); + 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"); + } match cx.bcx.build_config.message_format { MessageFormat::Short | MessageFormat::Json { short: true, .. } => { @@ -861,7 +873,7 @@ fn build_base_args( edition.cmd_edition_arg(cmd); add_path_args(bcx.ws, unit, cmd); - add_error_format_and_color(cx, cmd, cx.rmeta_required(unit)); + add_error_format_and_color(cx, cmd, unit, cx.rmeta_required(unit)); add_allow_features(cx, cmd); let mut contains_dy_lib = false; From 8c7c35ec477133f109510dad607548fea874f9f9 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Sun, 5 Dec 2021 14:09:07 -0600 Subject: [PATCH 3/7] Update docs --- src/doc/man/cargo-build.md | 1 + src/doc/man/cargo-check.md | 1 + src/doc/man/cargo-report.md | 40 ++++++++++++++++ src/doc/man/cargo-rustc.md | 1 + src/doc/man/cargo-test.md | 1 + src/doc/man/generated_txt/cargo-build.txt | 6 +++ src/doc/man/generated_txt/cargo-check.txt | 6 +++ src/doc/man/generated_txt/cargo-report.txt | 31 +++++++++++++ src/doc/man/generated_txt/cargo-rustc.txt | 6 +++ src/doc/man/generated_txt/cargo-test.txt | 6 +++ .../man/includes/options-future-incompat.md | 6 +++ src/doc/src/SUMMARY.md | 2 + src/doc/src/commands/build-commands.md | 1 + src/doc/src/commands/cargo-build.md | 6 +++ src/doc/src/commands/cargo-check.md | 6 +++ src/doc/src/commands/cargo-report.md | 41 +++++++++++++++++ src/doc/src/commands/cargo-rustc.md | 6 +++ src/doc/src/commands/cargo-test.md | 6 +++ .../src/reference/future-incompat-report.md | 24 ++++++++++ src/doc/src/reference/index.md | 1 + src/doc/src/reference/unstable.md | 35 ++------------ src/etc/man/cargo-build.1 | 8 ++++ src/etc/man/cargo-check.1 | 8 ++++ src/etc/man/cargo-report.1 | 46 +++++++++++++++++++ src/etc/man/cargo-rustc.1 | 8 ++++ src/etc/man/cargo-test.1 | 8 ++++ 26 files changed, 281 insertions(+), 30 deletions(-) create mode 100644 src/doc/man/cargo-report.md create mode 100644 src/doc/man/generated_txt/cargo-report.txt create mode 100644 src/doc/man/includes/options-future-incompat.md create mode 100644 src/doc/src/commands/cargo-report.md create mode 100644 src/doc/src/reference/future-incompat-report.md create mode 100644 src/etc/man/cargo-report.1 diff --git a/src/doc/man/cargo-build.md b/src/doc/man/cargo-build.md index 8b5aa471791..1a06b998343 100644 --- a/src/doc/man/cargo-build.md +++ b/src/doc/man/cargo-build.md @@ -89,6 +89,7 @@ See for more information. {{#options}} {{> options-jobs }} +{{> options-future-incompat }} {{/options}} {{> section-environment }} diff --git a/src/doc/man/cargo-check.md b/src/doc/man/cargo-check.md index 5264043f938..e0020f7c41a 100644 --- a/src/doc/man/cargo-check.md +++ b/src/doc/man/cargo-check.md @@ -74,6 +74,7 @@ they have `required-features` that are missing. {{#options}} {{> options-jobs }} +{{> options-future-incompat }} {{/options}} {{> section-environment }} diff --git a/src/doc/man/cargo-report.md b/src/doc/man/cargo-report.md new file mode 100644 index 00000000000..de974c47f08 --- /dev/null +++ b/src/doc/man/cargo-report.md @@ -0,0 +1,40 @@ +# cargo-report(1) + +## NAME + +cargo-report - Generate and display various kinds of reports + +## SYNOPSIS + +`cargo report` _type_ [_options_] + +### DESCRIPTION + +Displays a report of the given _type_ - currently, only `future-incompat` is supported + +## OPTIONS + +{{#options}} + +{{#option "`--id` _id_" }} +Show the report with the specified Cargo-generated id +{{/option}} + +{{#option "`-p` _spec_..." "`--package` _spec_..." }} +Only display a report for the specified package +{{/option}} + +{{/options}} + +## EXAMPLES + +1. Display the latest future-incompat report: + + cargo report future-incompat + +2. Display the latest future-incompat report for a specific package: + + cargo report future-incompat --package my-dep:0.0.1 + +## SEE ALSO +{{man "cargo" 1}} diff --git a/src/doc/man/cargo-rustc.md b/src/doc/man/cargo-rustc.md index de0159e54d3..53ed339caa8 100644 --- a/src/doc/man/cargo-rustc.md +++ b/src/doc/man/cargo-rustc.md @@ -100,6 +100,7 @@ See the [the reference](../reference/profiles.html) for more details on profiles {{#options}} {{> options-jobs }} +{{> options-future-incompat }} {{/options}} {{> section-environment }} diff --git a/src/doc/man/cargo-test.md b/src/doc/man/cargo-test.md index 2381a9e6ff7..be12eaa70a1 100644 --- a/src/doc/man/cargo-test.md +++ b/src/doc/man/cargo-test.md @@ -153,6 +153,7 @@ includes an option to control the number of threads used: {{#options}} {{> options-jobs }} +{{> options-future-incompat }} {{/options}} diff --git a/src/doc/man/generated_txt/cargo-build.txt b/src/doc/man/generated_txt/cargo-build.txt index 4aa746e95fd..99166910f3c 100644 --- a/src/doc/man/generated_txt/cargo-build.txt +++ b/src/doc/man/generated_txt/cargo-build.txt @@ -287,6 +287,12 @@ OPTIONS . Defaults to the number of CPUs. + --future-incompat-report + Displays a future-incompat report for any future-incompatible + warnings produced during execution of this command + + See cargo-report(1) + ENVIRONMENT See the reference diff --git a/src/doc/man/generated_txt/cargo-check.txt b/src/doc/man/generated_txt/cargo-check.txt index 28befe66d23..752cdbd40ee 100644 --- a/src/doc/man/generated_txt/cargo-check.txt +++ b/src/doc/man/generated_txt/cargo-check.txt @@ -281,6 +281,12 @@ OPTIONS . Defaults to the number of CPUs. + --future-incompat-report + Displays a future-incompat report for any future-incompatible + warnings produced during execution of this command + + See cargo-report(1) + ENVIRONMENT See the reference diff --git a/src/doc/man/generated_txt/cargo-report.txt b/src/doc/man/generated_txt/cargo-report.txt new file mode 100644 index 00000000000..02148c9aca1 --- /dev/null +++ b/src/doc/man/generated_txt/cargo-report.txt @@ -0,0 +1,31 @@ +CARGO-REPORT(1) + +NAME + cargo-report - Generate and display various kinds of reports + +SYNOPSIS + cargo report type [options] + + DESCRIPTION + Displays a report of the given type - currently, only future-incompat is + supported + +OPTIONS + --id id + Show the report with the specified Cargo-generated id + + -p spec..., --package spec... + Only display a report for the specified package + +EXAMPLES + 1. Display the latest future-incompat report: + + cargo report future-incompat + + 2. Display the latest future-incompat report for a specific package: + + cargo report future-incompat --package my-dep:0.0.1 + +SEE ALSO + cargo(1) + diff --git a/src/doc/man/generated_txt/cargo-rustc.txt b/src/doc/man/generated_txt/cargo-rustc.txt index f39d83626de..8960227e876 100644 --- a/src/doc/man/generated_txt/cargo-rustc.txt +++ b/src/doc/man/generated_txt/cargo-rustc.txt @@ -276,6 +276,12 @@ OPTIONS . Defaults to the number of CPUs. + --future-incompat-report + Displays a future-incompat report for any future-incompatible + warnings produced during execution of this command + + See cargo-report(1) + ENVIRONMENT See the reference diff --git a/src/doc/man/generated_txt/cargo-test.txt b/src/doc/man/generated_txt/cargo-test.txt index 599bbd075fd..3d58844c2c4 100644 --- a/src/doc/man/generated_txt/cargo-test.txt +++ b/src/doc/man/generated_txt/cargo-test.txt @@ -357,6 +357,12 @@ OPTIONS . Defaults to the number of CPUs. + --future-incompat-report + Displays a future-incompat report for any future-incompatible + warnings produced during execution of this command + + See cargo-report(1) + ENVIRONMENT See the reference diff --git a/src/doc/man/includes/options-future-incompat.md b/src/doc/man/includes/options-future-incompat.md new file mode 100644 index 00000000000..3a8a1e7b732 --- /dev/null +++ b/src/doc/man/includes/options-future-incompat.md @@ -0,0 +1,6 @@ +{{#option "`--future-incompat-report`"}} +Displays a future-incompat report for any future-incompatible warnings +produced during execution of this command + +See {{man "cargo-report" 1}} +{{/option}} diff --git a/src/doc/src/SUMMARY.md b/src/doc/src/SUMMARY.md index db67ffd4029..e5c58442256 100644 --- a/src/doc/src/SUMMARY.md +++ b/src/doc/src/SUMMARY.md @@ -38,6 +38,7 @@ * [Registries](reference/registries.md) * [Dependency Resolution](reference/resolver.md) * [SemVer Compatibility](reference/semver.md) + * [Future incompat report](reference/future-incompat-report.md) * [Unstable Features](reference/unstable.md) * [Cargo Commands](commands/index.md) @@ -57,6 +58,7 @@ * [cargo rustc](commands/cargo-rustc.md) * [cargo rustdoc](commands/cargo-rustdoc.md) * [cargo test](commands/cargo-test.md) + * [cargo report](commands/cargo-report.md) * [Manifest Commands](commands/manifest-commands.md) * [cargo generate-lockfile](commands/cargo-generate-lockfile.md) * [cargo locate-project](commands/cargo-locate-project.md) diff --git a/src/doc/src/commands/build-commands.md b/src/doc/src/commands/build-commands.md index 867f72bff47..5cc6fff96bf 100644 --- a/src/doc/src/commands/build-commands.md +++ b/src/doc/src/commands/build-commands.md @@ -10,3 +10,4 @@ * [cargo rustc](cargo-rustc.md) * [cargo rustdoc](cargo-rustdoc.md) * [cargo test](cargo-test.md) +* [cargo report](cargo-report.md) diff --git a/src/doc/src/commands/cargo-build.md b/src/doc/src/commands/cargo-build.md index 357f3d56120..b1d3fbbfe1c 100644 --- a/src/doc/src/commands/cargo-build.md +++ b/src/doc/src/commands/cargo-build.md @@ -354,6 +354,12 @@ for more information about how toolchain overrides work. the number of CPUs. +
--future-incompat-report
+
Displays a future-incompat report for any future-incompatible warnings +produced during execution of this command

+

See cargo-report(1)

+ + ## ENVIRONMENT diff --git a/src/doc/src/commands/cargo-check.md b/src/doc/src/commands/cargo-check.md index 70cd1bafa6e..1a8bce6bd3a 100644 --- a/src/doc/src/commands/cargo-check.md +++ b/src/doc/src/commands/cargo-check.md @@ -345,6 +345,12 @@ for more information about how toolchain overrides work. the number of CPUs. +
--future-incompat-report
+
Displays a future-incompat report for any future-incompatible warnings +produced during execution of this command

+

See cargo-report(1)

+ + ## ENVIRONMENT diff --git a/src/doc/src/commands/cargo-report.md b/src/doc/src/commands/cargo-report.md new file mode 100644 index 00000000000..fdac5e844d9 --- /dev/null +++ b/src/doc/src/commands/cargo-report.md @@ -0,0 +1,41 @@ +# cargo-report(1) + +## NAME + +cargo-report - Generate and display various kinds of reports + +## SYNOPSIS + +`cargo report` _type_ [_options_] + +### DESCRIPTION + +Displays a report of the given _type_ - currently, only `future-incompat` is supported + +## OPTIONS + +
+ +
--id id
+
Show the report with the specified Cargo-generated id
+ + +
-p spec...
+
--package spec...
+
Only display a report for the specified package
+ + +
+ +## EXAMPLES + +1. Display the latest future-incompat report: + + cargo report future-incompat + +2. Display the latest future-incompat report for a specific package: + + cargo report future-incompat --package my-dep:0.0.1 + +## SEE ALSO +[cargo(1)](cargo.html) diff --git a/src/doc/src/commands/cargo-rustc.md b/src/doc/src/commands/cargo-rustc.md index 5601425e6a9..a90e3074ce4 100644 --- a/src/doc/src/commands/cargo-rustc.md +++ b/src/doc/src/commands/cargo-rustc.md @@ -337,6 +337,12 @@ for more information about how toolchain overrides work. the number of CPUs. +
--future-incompat-report
+
Displays a future-incompat report for any future-incompatible warnings +produced during execution of this command

+

See cargo-report(1)

+ + ## ENVIRONMENT diff --git a/src/doc/src/commands/cargo-test.md b/src/doc/src/commands/cargo-test.md index 1bc44e5ebfc..4b55dd54a25 100644 --- a/src/doc/src/commands/cargo-test.md +++ b/src/doc/src/commands/cargo-test.md @@ -434,6 +434,12 @@ includes an option to control the number of threads used: the number of CPUs. +
--future-incompat-report
+
Displays a future-incompat report for any future-incompatible warnings +produced during execution of this command

+

See cargo-report(1)

+ + diff --git a/src/doc/src/reference/future-incompat-report.md b/src/doc/src/reference/future-incompat-report.md new file mode 100644 index 00000000000..5ec93618fbd --- /dev/null +++ b/src/doc/src/reference/future-incompat-report.md @@ -0,0 +1,24 @@ +### Future incompat report + +Cargo checks for future-incompatible warnings in all dependencies. These are warnings for +changes that may become hard errors in the future, causing the dependency to +stop building in a future version of rustc. If any warnings are found, a small +notice is displayed indicating that the warnings were found, and provides +instructions on how to display a full report. + +A full report can be displayed with the `cargo report future-incompatibilities +--id ID` command, or by running the build again with +the `--future-incompat-report` flag. The developer should then update their +dependencies to a version where the issue is fixed, or work with the +developers of the dependencies to help resolve the issue. + +This feature can be configured through a `[future-incompat-report]` +section in `.cargo/config`. Currently, the supported options are: + +``` +[future-incompat-report] +frequency = FREQUENCY +``` + +The supported values for `FREQUENCY` are 'always` and 'never', which control +whether or not a message is printed out at the end of `cargo build` / `cargo check`. diff --git a/src/doc/src/reference/index.md b/src/doc/src/reference/index.md index ced87fa61b7..298647a57a3 100644 --- a/src/doc/src/reference/index.md +++ b/src/doc/src/reference/index.md @@ -21,4 +21,5 @@ The reference covers the details of various areas of Cargo. * [Registries](registries.md) * [Dependency Resolution](resolver.md) * [SemVer Compatibility](semver.md) +* [Future incompat report](future-incompat-report.md) * [Unstable Features](unstable.md) diff --git a/src/doc/src/reference/unstable.md b/src/doc/src/reference/unstable.md index 6b254fd3297..ec26f31d2cd 100644 --- a/src/doc/src/reference/unstable.md +++ b/src/doc/src/reference/unstable.md @@ -94,7 +94,6 @@ Each new feature described below should explain how to use it. * [Build-plan](#build-plan) — Emits JSON information on which commands will be run. * [timings](#timings) — Generates a report on how long individual dependencies took to run. * [unit-graph](#unit-graph) — Emits JSON for Cargo's internal graph structure. - * [future incompat report](#future-incompat-report) — Displays a report for future incompatibilities that may error in the future. * [`cargo rustc --print`](#rustc---print) — Calls rustc with `--print` to display information from rustc. * Configuration * [config-cli](#config-cli) — Adds the ability to pass configuration options on the command-line. @@ -1143,35 +1142,6 @@ cargo logout -Z credential-process [crates.io]: https://crates.io/ [config file]: config.md -### future incompat report -* RFC: [#2834](https://github.com/rust-lang/rfcs/blob/master/text/2834-cargo-report-future-incompat.md) -* rustc Tracking Issue: [#71249](https://github.com/rust-lang/rust/issues/71249) - -The `-Z future-incompat-report` flag causes Cargo to check for -future-incompatible warnings in all dependencies. These are warnings for -changes that may become hard errors in the future, causing the dependency to -stop building in a future version of rustc. If any warnings are found, a small -notice is displayed indicating that the warnings were found, and provides -instructions on how to display a full report. - -A full report can be displayed with the `cargo report future-incompatibilities --Z future-incompat-report --id ID` command, or by running the build again with -the `--future-incompat-report` flag. The developer should then update their -dependencies to a version where the issue is fixed, or work with the -developers of the dependencies to help resolve the issue. - -This feature can be configured through a `[future-incompat-report]` -section in `.cargo/config`. Currently, the supported options are: - -``` -[future-incompat-report] -frequency = FREQUENCY -``` - -The supported values for `FREQUENCY` are 'always` and 'never', which control -whether or not a message is printed out at the end of `cargo build` / `cargo check`. - - ### `cargo config` * Original Issue: [#2362](https://github.com/rust-lang/cargo/issues/2362) @@ -1403,6 +1373,11 @@ See [`cargo fix --edition`](../commands/cargo-fix.md) and [The Edition Guide](.. Custom named profiles have been stabilized in the 1.57 release. See the [profiles chapter](profiles.md#custom-profiles) for more information. +### Future incompat report + +Support for generating a future-incompat report has been stabilized +in the 1.59 release. See the [future incompat report chapter](future-incompat-report.md) +for more information. ### scrape-examples diff --git a/src/etc/man/cargo-build.1 b/src/etc/man/cargo-build.1 index 832c70686d2..c258b7e06c6 100644 --- a/src/etc/man/cargo-build.1 +++ b/src/etc/man/cargo-build.1 @@ -359,6 +359,14 @@ Number of parallel jobs to run. May also be specified with the \fBbuild.jobs\fR \fIconfig value\fR \&. Defaults to the number of CPUs. .RE +.sp +\fB\-\-future\-incompat\-report\fR +.RS 4 +Displays a future\-incompat report for any future\-incompatible warnings +produced during execution of this command +.sp +See \fBcargo\-report\fR(1) +.RE .SH "ENVIRONMENT" See \fIthe reference\fR for details on environment variables that Cargo reads. diff --git a/src/etc/man/cargo-check.1 b/src/etc/man/cargo-check.1 index 420a04212e5..0fe36e554d5 100644 --- a/src/etc/man/cargo-check.1 +++ b/src/etc/man/cargo-check.1 @@ -349,6 +349,14 @@ Number of parallel jobs to run. May also be specified with the \fBbuild.jobs\fR \fIconfig value\fR \&. Defaults to the number of CPUs. .RE +.sp +\fB\-\-future\-incompat\-report\fR +.RS 4 +Displays a future\-incompat report for any future\-incompatible warnings +produced during execution of this command +.sp +See \fBcargo\-report\fR(1) +.RE .SH "ENVIRONMENT" See \fIthe reference\fR for details on environment variables that Cargo reads. diff --git a/src/etc/man/cargo-report.1 b/src/etc/man/cargo-report.1 new file mode 100644 index 00000000000..6e9a22790e0 --- /dev/null +++ b/src/etc/man/cargo-report.1 @@ -0,0 +1,46 @@ +'\" t +.TH "CARGO\-REPORT" "1" +.nh +.ad l +.ss \n[.ss] 0 +.SH "NAME" +cargo\-report \- Generate and display various kinds of reports +.SH "SYNOPSIS" +\fBcargo report\fR \fItype\fR [\fIoptions\fR] +.SS "DESCRIPTION" +Displays a report of the given \fItype\fR \- currently, only \fBfuture\-incompat\fR is supported +.SH "OPTIONS" +.sp +\fB\-\-id\fR \fIid\fR +.RS 4 +Show the report with the specified Cargo\-generated id +.RE +.sp +\fB\-p\fR \fIspec\fR\&..., +\fB\-\-package\fR \fIspec\fR\&... +.RS 4 +Only display a report for the specified package +.RE +.SH "EXAMPLES" +.sp +.RS 4 +\h'-04' 1.\h'+01'Display the latest future\-incompat report: +.sp +.RS 4 +.nf +cargo report future\-incompat +.fi +.RE +.RE +.sp +.RS 4 +\h'-04' 2.\h'+01'Display the latest future\-incompat report for a specific package: +.sp +.RS 4 +.nf +cargo report future\-incompat \-\-package my\-dep:0.0.1 +.fi +.RE +.RE +.SH "SEE ALSO" +\fBcargo\fR(1) diff --git a/src/etc/man/cargo-rustc.1 b/src/etc/man/cargo-rustc.1 index f73643102be..a705cb79750 100644 --- a/src/etc/man/cargo-rustc.1 +++ b/src/etc/man/cargo-rustc.1 @@ -344,6 +344,14 @@ Number of parallel jobs to run. May also be specified with the \fBbuild.jobs\fR \fIconfig value\fR \&. Defaults to the number of CPUs. .RE +.sp +\fB\-\-future\-incompat\-report\fR +.RS 4 +Displays a future\-incompat report for any future\-incompatible warnings +produced during execution of this command +.sp +See \fBcargo\-report\fR(1) +.RE .SH "ENVIRONMENT" See \fIthe reference\fR for details on environment variables that Cargo reads. diff --git a/src/etc/man/cargo-test.1 b/src/etc/man/cargo-test.1 index eaa000305d3..ae5f527223c 100644 --- a/src/etc/man/cargo-test.1 +++ b/src/etc/man/cargo-test.1 @@ -453,6 +453,14 @@ Number of parallel jobs to run. May also be specified with the \fBbuild.jobs\fR \fIconfig value\fR \&. Defaults to the number of CPUs. .RE +.sp +\fB\-\-future\-incompat\-report\fR +.RS 4 +Displays a future\-incompat report for any future\-incompatible warnings +produced during execution of this command +.sp +See \fBcargo\-report\fR(1) +.RE .SH "ENVIRONMENT" See \fIthe reference\fR for details on environment variables that Cargo reads. From 365cae37b72b7ca3d4bf522f0b7fe294c9e72d7d Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Mon, 6 Dec 2021 10:29:17 -0600 Subject: [PATCH 4/7] Fix detection of `--json future-incompat` --- src/cargo/core/compiler/build_context/target_info.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cargo/core/compiler/build_context/target_info.rs b/src/cargo/core/compiler/build_context/target_info.rs index 588c4cb4691..505910d5fa2 100644 --- a/src/cargo/core/compiler/build_context/target_info.rs +++ b/src/cargo/core/compiler/build_context/target_info.rs @@ -183,7 +183,9 @@ impl TargetInfo { let supports_json_future_incompat = rustc .cached_output( - process.clone().arg("--json").arg("future-incompat"), + process + .clone() + .args(&["--error-format", "json", "--json", "future-incompat"]), extra_fingerprint, ) .is_ok(); From a717196b2bdeda0028f18d910c357675b97ab8d0 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Mon, 6 Dec 2021 10:41:25 -0600 Subject: [PATCH 5/7] Improve documentation and add [future-incompat-report] config section --- src/doc/man/cargo-report.md | 2 ++ src/doc/man/generated_txt/cargo-report.txt | 3 +++ src/doc/src/commands/cargo-report.md | 2 ++ src/doc/src/reference/config.md | 16 ++++++++++++++++ src/etc/man/cargo-report.1 | 2 ++ 5 files changed, 25 insertions(+) diff --git a/src/doc/man/cargo-report.md b/src/doc/man/cargo-report.md index de974c47f08..a505a014a33 100644 --- a/src/doc/man/cargo-report.md +++ b/src/doc/man/cargo-report.md @@ -37,4 +37,6 @@ Only display a report for the specified package cargo report future-incompat --package my-dep:0.0.1 ## SEE ALSO +[Future incompat report](../reference/future-incompat-report.html) + {{man "cargo" 1}} diff --git a/src/doc/man/generated_txt/cargo-report.txt b/src/doc/man/generated_txt/cargo-report.txt index 02148c9aca1..489e45dcbb7 100644 --- a/src/doc/man/generated_txt/cargo-report.txt +++ b/src/doc/man/generated_txt/cargo-report.txt @@ -27,5 +27,8 @@ EXAMPLES cargo report future-incompat --package my-dep:0.0.1 SEE ALSO + Future incompat report + + cargo(1) diff --git a/src/doc/src/commands/cargo-report.md b/src/doc/src/commands/cargo-report.md index fdac5e844d9..5df2303e6af 100644 --- a/src/doc/src/commands/cargo-report.md +++ b/src/doc/src/commands/cargo-report.md @@ -38,4 +38,6 @@ Displays a report of the given _type_ - currently, only `future-incompat` is sup cargo report future-incompat --package my-dep:0.0.1 ## SEE ALSO +[Future incompat report](../reference/future-incompat-report.html) + [cargo(1)](cargo.html) diff --git a/src/doc/src/reference/config.md b/src/doc/src/reference/config.md index 65918cc5d3e..f65949d6ae6 100644 --- a/src/doc/src/reference/config.md +++ b/src/doc/src/reference/config.md @@ -87,6 +87,9 @@ ENV_VAR_NAME_2 = { value = "value", force = true } # Value is relative to .cargo directory containing `config.toml`, make absolute ENV_VAR_NAME_3 = { value = "relative/path", relative = true } +[future-incompat-report] +frequency = 'always' # when to display a notification about a future incompat report + [cargo-new] vcs = "none" # VCS to use ('git', 'hg', 'pijul', 'fossil', 'none') @@ -1058,3 +1061,16 @@ Sets the width for progress bar. [revision]: https://git-scm.com/docs/gitrevisions [registries]: registries.md [crates.io]: https://crates.io/ + +### `[future-incompat-report]` + +The `[future-incompat-report]` table controls setting for [future incompat reporting](../reference/future-incompat-report.html) + +#### `future-incompat-report.frequency` +* Type: string +* Default: "always" + +Controls how often we display a notification to the terminal when a future incompat report is available. Possible values: + +* `always` (default): Always display a notification when a command (e.g. `cargo build`) produces a future incompat report +* `never`: Never display a notification diff --git a/src/etc/man/cargo-report.1 b/src/etc/man/cargo-report.1 index 6e9a22790e0..d72bedbad69 100644 --- a/src/etc/man/cargo-report.1 +++ b/src/etc/man/cargo-report.1 @@ -43,4 +43,6 @@ cargo report future\-incompat \-\-package my\-dep:0.0.1 .RE .RE .SH "SEE ALSO" +\fIFuture incompat report\fR +.sp \fBcargo\fR(1) From 4fcf5ca6a4cb7c13082bfa269680cb9ab856583f Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Mon, 6 Dec 2021 11:57:00 -0600 Subject: [PATCH 6/7] Adjust `[future-incompat-report]` docs --- src/doc/src/reference/config.md | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/doc/src/reference/config.md b/src/doc/src/reference/config.md index f65949d6ae6..540dfb206a3 100644 --- a/src/doc/src/reference/config.md +++ b/src/doc/src/reference/config.md @@ -507,6 +507,20 @@ TMPDIR = { value = "/home/tmp", force = true } OPENSSL_DIR = { value = "vendor/openssl", relative = true } ``` +### `[future-incompat-report]` + +The `[future-incompat-report]` table controls setting for [future incompat reporting](future-incompat-report.md) + +#### `future-incompat-report.frequency` +* Type: string +* Default: "always" +* Environment: `CARGO_FUTURE_INCOMPAT_REPORT_FREQUENCY` + +Controls how often we display a notification to the terminal when a future incompat report is available. Possible values: + +* `always` (default): Always display a notification when a command (e.g. `cargo build`) produces a future incompat report +* `never`: Never display a notification + #### `[http]` The `[http]` table defines settings for HTTP behavior. This includes fetching @@ -1061,16 +1075,3 @@ Sets the width for progress bar. [revision]: https://git-scm.com/docs/gitrevisions [registries]: registries.md [crates.io]: https://crates.io/ - -### `[future-incompat-report]` - -The `[future-incompat-report]` table controls setting for [future incompat reporting](../reference/future-incompat-report.html) - -#### `future-incompat-report.frequency` -* Type: string -* Default: "always" - -Controls how often we display a notification to the terminal when a future incompat report is available. Possible values: - -* `always` (default): Always display a notification when a command (e.g. `cargo build`) produces a future incompat report -* `never`: Never display a notification From 673b15d5e667784f78a0f647ffbf45b817075adc Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Mon, 6 Dec 2021 12:01:07 -0600 Subject: [PATCH 7/7] Add CARGO_FUTURE_INCOMPAT_REPORT_FREQUENCY to environment variables --- src/doc/src/reference/environment-variables.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/doc/src/reference/environment-variables.md b/src/doc/src/reference/environment-variables.md index 88f3c94e440..ad9cfab1b6c 100644 --- a/src/doc/src/reference/environment-variables.md +++ b/src/doc/src/reference/environment-variables.md @@ -83,6 +83,7 @@ supported environment variables are: * `CARGO_BUILD_DEP_INFO_BASEDIR` — Dep-info relative directory, see [`build.dep-info-basedir`]. * `CARGO_BUILD_PIPELINING` — Whether or not to use `rustc` pipelining, see [`build.pipelining`]. * `CARGO_CARGO_NEW_VCS` — The default source control system with [`cargo new`], see [`cargo-new.vcs`]. +* `CARGO_FUTURE_INCOMPAT_REPORT_FREQUENCY` - How often we should generate a future incompat report notifcation, see [`future-incompat-report.frequency`]. * `CARGO_HTTP_DEBUG` — Enables HTTP debugging, see [`http.debug`]. * `CARGO_HTTP_PROXY` — Enables HTTP proxy, see [`http.proxy`]. * `CARGO_HTTP_TIMEOUT` — The HTTP timeout, see [`http.timeout`]. @@ -144,6 +145,7 @@ supported environment variables are: [`cargo-new.name`]: config.md#cargo-newname [`cargo-new.email`]: config.md#cargo-newemail [`cargo-new.vcs`]: config.md#cargo-newvcs +[`future-incompat-report.frequency`]: config.md#future-incompat-reportfrequency [`http.debug`]: config.md#httpdebug [`http.proxy`]: config.md#httpproxy [`http.timeout`]: config.md#httptimeout