Skip to content

Commit

Permalink
Rename enable_future_incompat_feature -> future_incompat_report
Browse files Browse the repository at this point in the history
Rename the field so that it has the same name as the corresponding
unstable feature.
  • Loading branch information
PicoJr committed Apr 19, 2021
1 parent 1eb8588 commit e742b89
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/cargo/core/compiler/job_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ impl<'cfg> DrainState<'cfg> {
}

fn emit_future_incompat(&mut self, cx: &mut Context<'_, '_>) {
if cx.bcx.config.cli_unstable().enable_future_incompat_feature {
if cx.bcx.config.cli_unstable().future_incompat_report {
if self.per_crate_future_incompat_reports.is_empty() {
drop(
cx.bcx
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/core/compiler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ fn build_base_args(
.env("RUSTC_BOOTSTRAP", "1");
}

if bcx.config.cli_unstable().enable_future_incompat_feature {
if bcx.config.cli_unstable().future_incompat_report {
cmd.arg("-Z").arg("emit-future-incompat-report");
}

Expand Down
4 changes: 2 additions & 2 deletions src/cargo/core/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ cli_options!(
pub doctest_in_workspace: bool = ("Compile doctests with paths relative to the workspace root"),
pub doctest_xcompile: bool = ("Compile and run doctests for non-host target using runner config"),
pub dual_proc_macros: bool = ("Build proc-macros for both the host and the target"),
pub enable_future_incompat_feature: bool = ("Enable creation of a future-incompat report for all dependencies"),
pub future_incompat_report: bool = ("Enable creation of a future-incompat report for all dependencies"),
pub extra_link_arg: bool = ("Allow `cargo:rustc-link-arg` in build scripts"),
pub features: Option<Vec<String>> = (HIDDEN),
pub jobserver_per_rustc: bool = (HIDDEN),
Expand Down Expand Up @@ -825,7 +825,7 @@ impl CliUnstable {
"config-profile" => stabilized_warn(k, "1.43", STABILIZED_CONFIG_PROFILE),
"crate-versions" => stabilized_warn(k, "1.47", STABILIZED_CRATE_VERSIONS),
"package-features" => stabilized_warn(k, "1.51", STABILIZED_PACKAGE_FEATURES),
"future-incompat-report" => self.enable_future_incompat_feature = parse_empty(k, v)?,
"future-incompat-report" => self.future_incompat_report = parse_empty(k, v)?,
_ => bail!("unknown `-Z` flag specified: {}", k),
}

Expand Down
2 changes: 1 addition & 1 deletion src/cargo/util/command_prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ pub trait ArgMatchesExt {
// TODO: Tracking issue
.fail_if_stable_opt("--future-incompat-report", 9241)?;

if !config.cli_unstable().enable_future_incompat_feature {
if !config.cli_unstable().future_incompat_report {
anyhow::bail!(
"Usage of `--future-incompat-report` requires `-Z future-incompat-report`"
)
Expand Down

0 comments on commit e742b89

Please sign in to comment.