From 8818eace09b05f07afcfe03d838a214e2afa47b4 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Mon, 23 Mar 2020 11:21:27 +1100 Subject: [PATCH 1/5] Add a comment to `parse_bool`. It's behaviour can be surprising. --- src/librustc_session/options.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/librustc_session/options.rs b/src/librustc_session/options.rs index a1ecf4e8528be..9fd7b7e2e9beb 100644 --- a/src/librustc_session/options.rs +++ b/src/librustc_session/options.rs @@ -299,6 +299,9 @@ macro_rules! options { } )* + /// Set a flag to true. Note that it cannot set the flag to false, so + /// using this parser in combination with a flag that defaults to true + /// is useless; the flag will always be true. fn parse_bool(slot: &mut bool, v: Option<&str>) -> bool { match v { Some(..) => false, From f19ab9ad9db52f8720a44e5ddb8f4fb8db70a3ec Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Mon, 23 Mar 2020 11:41:35 +1100 Subject: [PATCH 2/5] Remove `-Z incremental-queries`. Because it uses `parse_bool` and defaults to true, it is actually impossible to set it to false. And it hasn't been experimental for some time now. --- src/librustc/ty/query/plumbing.rs | 4 +--- src/librustc_incremental/persist/load.rs | 2 +- src/librustc_incremental/persist/save.rs | 8 +++----- src/librustc_session/options.rs | 2 -- src/tools/compiletest/src/runtest.rs | 1 - 5 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/librustc/ty/query/plumbing.rs b/src/librustc/ty/query/plumbing.rs index 80a4e552f02d6..841f998b53e4a 100644 --- a/src/librustc/ty/query/plumbing.rs +++ b/src/librustc/ty/query/plumbing.rs @@ -615,9 +615,7 @@ impl<'tcx> TyCtxt<'tcx> { debug_assert!(self.dep_graph.is_green(dep_node)); // First we try to load the result from the on-disk cache. - let result = if Q::cache_on_disk(self, key.clone(), None) - && self.sess.opts.debugging_opts.incremental_queries - { + let result = if Q::cache_on_disk(self, key.clone(), None) { let prof_timer = self.prof.incr_cache_loading(); let result = Q::try_load_from_disk(self, prev_dep_node_index); prof_timer.finish_with_query_invocation_id(dep_node_index.into()); diff --git a/src/librustc_incremental/persist/load.rs b/src/librustc_incremental/persist/load.rs index 8a11586250dec..537906eb87189 100644 --- a/src/librustc_incremental/persist/load.rs +++ b/src/librustc_incremental/persist/load.rs @@ -195,7 +195,7 @@ pub fn load_dep_graph(sess: &Session) -> DepGraphFuture { } pub fn load_query_result_cache(sess: &Session) -> OnDiskCache<'_> { - if sess.opts.incremental.is_none() || !sess.opts.debugging_opts.incremental_queries { + if sess.opts.incremental.is_none() { return OnDiskCache::new_empty(sess.source_map()); } diff --git a/src/librustc_incremental/persist/save.rs b/src/librustc_incremental/persist/save.rs index ba586d0cfba04..17dbad5c8bb49 100644 --- a/src/librustc_incremental/persist/save.rs +++ b/src/librustc_incremental/persist/save.rs @@ -31,11 +31,9 @@ pub fn save_dep_graph(tcx: TyCtxt<'_>) { join( move || { - if tcx.sess.opts.debugging_opts.incremental_queries { - sess.time("incr_comp_persist_result_cache", || { - save_in(sess, query_cache_path, |e| encode_query_cache(tcx, e)); - }); - } + sess.time("incr_comp_persist_result_cache", || { + save_in(sess, query_cache_path, |e| encode_query_cache(tcx, e)); + }); }, || { sess.time("incr_comp_persist_dep_graph", || { diff --git a/src/librustc_session/options.rs b/src/librustc_session/options.rs index 9fd7b7e2e9beb..787bbf6133f61 100644 --- a/src/librustc_session/options.rs +++ b/src/librustc_session/options.rs @@ -791,8 +791,6 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options, "print tasks that execute and the color their dep node gets (requires debug build)"), incremental: Option = (None, parse_opt_string, [UNTRACKED], "enable incremental compilation (experimental)"), - incremental_queries: bool = (true, parse_bool, [UNTRACKED], - "enable incremental compilation support for queries (experimental)"), incremental_info: bool = (false, parse_bool, [UNTRACKED], "print high-level information about incremental reuse (or the lack thereof)"), incremental_dump_hash: bool = (false, parse_bool, [UNTRACKED], diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index b04012af515dd..faefbb1579035 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -1852,7 +1852,6 @@ impl<'test> TestCx<'test> { if let Some(ref incremental_dir) = self.props.incremental_dir { rustc.args(&["-C", &format!("incremental={}", incremental_dir.display())]); rustc.args(&["-Z", "incremental-verify-ich"]); - rustc.args(&["-Z", "incremental-queries"]); } if self.config.mode == CodegenUnits { From fa432597ea463f3c9cae4a8116154f9dc0114858 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 24 Mar 2020 12:01:45 +1100 Subject: [PATCH 3/5] Invert `-Z generate-arange-section`. Because it uses `parse_bool` and defaults to true, it is actually impossible to set it to false. Inverting its sense to `-Z no-generate-arange-section` makes it usable. --- src/librustc_codegen_llvm/llvm_util.rs | 3 +-- src/librustc_session/options.rs | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/librustc_codegen_llvm/llvm_util.rs b/src/librustc_codegen_llvm/llvm_util.rs index 5e924c9af8481..2ccc861ddbb42 100644 --- a/src/librustc_codegen_llvm/llvm_util.rs +++ b/src/librustc_codegen_llvm/llvm_util.rs @@ -80,8 +80,7 @@ unsafe fn configure_llvm(sess: &Session) { if sess.print_llvm_passes() { add("-debug-pass=Structure", false); } - - if sess.opts.debugging_opts.generate_arange_section { + if !sess.opts.debugging_opts.no_generate_arange_section { add("-generate-arange-section", false); } if get_major_version() >= 8 { diff --git a/src/librustc_session/options.rs b/src/librustc_session/options.rs index 787bbf6133f61..f6f28b7ad252e 100644 --- a/src/librustc_session/options.rs +++ b/src/librustc_session/options.rs @@ -815,8 +815,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options, "for every macro invocation, print its name and arguments"), debug_macros: bool = (false, parse_bool, [TRACKED], "emit line numbers debug info inside macros"), - generate_arange_section: bool = (true, parse_bool, [TRACKED], - "generate DWARF address ranges for faster lookups"), + no_generate_arange_section: bool = (false, parse_bool, [TRACKED], + "don't generate DWARF address ranges that give faster lookups"), keep_hygiene_data: bool = (false, parse_bool, [UNTRACKED], "don't clear the hygiene data after analysis"), keep_ast: bool = (false, parse_bool, [UNTRACKED], From a3782671cf1e190ffa470128a53329177b2c9a2f Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Mon, 23 Mar 2020 12:21:51 +1100 Subject: [PATCH 4/5] Remove several dead `-Z` options. --- src/librustc_interface/tests.rs | 2 -- src/librustc_session/options.rs | 8 -------- 2 files changed, 10 deletions(-) diff --git a/src/librustc_interface/tests.rs b/src/librustc_interface/tests.rs index db5ada9291435..935b1e00ed662 100644 --- a/src/librustc_interface/tests.rs +++ b/src/librustc_interface/tests.rs @@ -560,8 +560,6 @@ fn test_debugging_options_tracking_hash() { assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); opts.debugging_opts.keep_hygiene_data = true; assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); - opts.debugging_opts.keep_ast = true; - assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); opts.debugging_opts.print_mono_items = Some(String::from("abc")); assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); opts.debugging_opts.dump_mir = Some(String::from("abc")); diff --git a/src/librustc_session/options.rs b/src/librustc_session/options.rs index f6f28b7ad252e..f4d4c09536817 100644 --- a/src/librustc_session/options.rs +++ b/src/librustc_session/options.rs @@ -793,8 +793,6 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options, "enable incremental compilation (experimental)"), incremental_info: bool = (false, parse_bool, [UNTRACKED], "print high-level information about incremental reuse (or the lack thereof)"), - incremental_dump_hash: bool = (false, parse_bool, [UNTRACKED], - "dump hash information in textual format to stdout"), incremental_verify_ich: bool = (false, parse_bool, [UNTRACKED], "verify incr. comp. hashes of green query instances"), incremental_ignore_spans: bool = (false, parse_bool, [UNTRACKED], @@ -819,8 +817,6 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options, "don't generate DWARF address ranges that give faster lookups"), keep_hygiene_data: bool = (false, parse_bool, [UNTRACKED], "don't clear the hygiene data after analysis"), - keep_ast: bool = (false, parse_bool, [UNTRACKED], - "keep the AST after lowering it to HIR"), show_span: Option = (None, parse_opt_string, [TRACKED], "show spans for compiler debugging (expr|pat|ty)"), print_type_sizes: bool = (false, parse_bool, [UNTRACKED], @@ -855,8 +851,6 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options, "print some statistics about AST and HIR"), always_encode_mir: bool = (false, parse_bool, [TRACKED], "encode MIR of all functions into the crate metadata"), - json_rendered: Option = (None, parse_opt_string, [UNTRACKED], - "describes how to render the `rendered` field of json diagnostics"), unleash_the_miri_inside_of_you: bool = (false, parse_bool, [TRACKED], "take the breaks off const evaluation. NOTE: this is unsound"), osx_rpath_install_name: bool = (false, parse_bool, [TRACKED], @@ -887,8 +881,6 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options, "emit diagnostics rather than buffering (breaks NLL error downgrading, sorting)."), polonius: bool = (false, parse_bool, [UNTRACKED], "enable polonius-based borrow-checker"), - codegen_time_graph: bool = (false, parse_bool, [UNTRACKED], - "generate a graphical HTML report of time spent in codegen and LLVM"), thinlto: Option = (None, parse_opt_bool, [TRACKED], "enable ThinLTO when possible"), inline_in_all_cgus: Option = (None, parse_opt_bool, [TRACKED], From 46c8a2c26eee8148e47237e90efde558d1374580 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Mon, 23 Mar 2020 14:13:54 +1100 Subject: [PATCH 5/5] Remove `-Z incremental`. `-C incremental` was introduced over two years ago. `-Z incremental` was kept for transitioning, but it's been long enough now that it should be ok to remove it. --- src/librustc_interface/tests.rs | 2 -- src/librustc_session/config.rs | 29 +------------------ src/librustc_session/options.rs | 2 -- .../partitioning/extern-drop-glue.rs | 4 +-- .../partitioning/extern-generic.rs | 4 +-- .../inlining-from-extern-crate.rs | 4 +-- .../partitioning/local-drop-glue.rs | 4 +-- .../partitioning/local-generic.rs | 4 +-- .../local-inlining-but-not-all.rs | 4 +-- .../partitioning/local-inlining.rs | 4 +-- .../partitioning/local-transitive-inlining.rs | 4 +-- .../methods-are-with-self-type.rs | 4 +-- .../partitioning/regular-modules.rs | 4 +-- .../partitioning/shared-generics.rs | 2 +- .../codegen-units/partitioning/statics.rs | 4 +-- .../partitioning/vtable-through-const.rs | 4 +-- src/tools/compiletest/src/runtest.rs | 6 ++-- 17 files changed, 29 insertions(+), 60 deletions(-) diff --git a/src/librustc_interface/tests.rs b/src/librustc_interface/tests.rs index 935b1e00ed662..6a6d0a8f061eb 100644 --- a/src/librustc_interface/tests.rs +++ b/src/librustc_interface/tests.rs @@ -546,8 +546,6 @@ fn test_debugging_options_tracking_hash() { assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); opts.debugging_opts.parse_only = true; assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); - opts.debugging_opts.incremental = Some(String::from("abc")); - assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); opts.debugging_opts.dump_dep_graph = true; assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash()); opts.debugging_opts.query_dep_graph = true; diff --git a/src/librustc_session/config.rs b/src/librustc_session/config.rs index 6c4d70c09a39a..663cfa223c7a8 100644 --- a/src/librustc_session/config.rs +++ b/src/librustc_session/config.rs @@ -1286,33 +1286,6 @@ fn check_thread_count(debugging_opts: &DebuggingOptions, error_format: ErrorOutp } } -fn select_incremental_path( - debugging_opts: &DebuggingOptions, - cg: &CodegenOptions, - error_format: ErrorOutputType, -) -> Option { - match (&debugging_opts.incremental, &cg.incremental) { - (Some(path1), Some(path2)) => { - if path1 != path2 { - early_error( - error_format, - &format!( - "conflicting paths for `-Z incremental` and \ - `-C incremental` specified: {} versus {}", - path1, path2 - ), - ); - } else { - Some(path1) - } - } - (Some(path), None) => Some(path), - (None, Some(path)) => Some(path), - (None, None) => None, - } - .map(PathBuf::from) -} - fn collect_print_requests( cg: &mut CodegenOptions, dopts: &mut DebuggingOptions, @@ -1677,7 +1650,7 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options { check_thread_count(&debugging_opts, error_format); - let incremental = select_incremental_path(&debugging_opts, &cg, error_format); + let incremental = cg.incremental.as_ref().map(|m| PathBuf::from(m)); if debugging_opts.profile && incremental.is_some() { early_error( diff --git a/src/librustc_session/options.rs b/src/librustc_session/options.rs index f4d4c09536817..72c720d09b0bf 100644 --- a/src/librustc_session/options.rs +++ b/src/librustc_session/options.rs @@ -789,8 +789,6 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options, "support compiling tests with panic=abort"), dep_tasks: bool = (false, parse_bool, [UNTRACKED], "print tasks that execute and the color their dep node gets (requires debug build)"), - incremental: Option = (None, parse_opt_string, [UNTRACKED], - "enable incremental compilation (experimental)"), incremental_info: bool = (false, parse_bool, [UNTRACKED], "print high-level information about incremental reuse (or the lack thereof)"), incremental_verify_ich: bool = (false, parse_bool, [UNTRACKED], diff --git a/src/test/codegen-units/partitioning/extern-drop-glue.rs b/src/test/codegen-units/partitioning/extern-drop-glue.rs index 662519067d78e..1cb85382239cd 100644 --- a/src/test/codegen-units/partitioning/extern-drop-glue.rs +++ b/src/test/codegen-units/partitioning/extern-drop-glue.rs @@ -1,9 +1,9 @@ // ignore-tidy-linelength -// We specify -Z incremental here because we want to test the partitioning for +// We specify -C incremental here because we want to test the partitioning for // incremental compilation // We specify opt-level=0 because `drop_in_place` is `Internal` when optimizing -// compile-flags:-Zprint-mono-items=lazy -Zincremental=tmp/partitioning-tests/extern-drop-glue +// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/extern-drop-glue // compile-flags:-Zinline-in-all-cgus -Copt-level=0 #![allow(dead_code)] diff --git a/src/test/codegen-units/partitioning/extern-generic.rs b/src/test/codegen-units/partitioning/extern-generic.rs index c96c54312fbaa..88d6116a987fe 100644 --- a/src/test/codegen-units/partitioning/extern-generic.rs +++ b/src/test/codegen-units/partitioning/extern-generic.rs @@ -1,7 +1,7 @@ // ignore-tidy-linelength -// We specify -Z incremental here because we want to test the partitioning for +// We specify -C incremental here because we want to test the partitioning for // incremental compilation -// compile-flags:-Zprint-mono-items=eager -Zincremental=tmp/partitioning-tests/extern-generic -Zshare-generics=y +// compile-flags:-Zprint-mono-items=eager -Cincremental=tmp/partitioning-tests/extern-generic -Zshare-generics=y #![allow(dead_code)] #![crate_type="lib"] diff --git a/src/test/codegen-units/partitioning/inlining-from-extern-crate.rs b/src/test/codegen-units/partitioning/inlining-from-extern-crate.rs index e943f54a40631..7afeb0a0f367b 100644 --- a/src/test/codegen-units/partitioning/inlining-from-extern-crate.rs +++ b/src/test/codegen-units/partitioning/inlining-from-extern-crate.rs @@ -1,7 +1,7 @@ // ignore-tidy-linelength -// We specify -Z incremental here because we want to test the partitioning for +// We specify -C incremental here because we want to test the partitioning for // incremental compilation -// compile-flags:-Zprint-mono-items=lazy -Zincremental=tmp/partitioning-tests/inlining-from-extern-crate +// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/inlining-from-extern-crate // compile-flags:-Zinline-in-all-cgus #![crate_type="lib"] diff --git a/src/test/codegen-units/partitioning/local-drop-glue.rs b/src/test/codegen-units/partitioning/local-drop-glue.rs index 14a50bf579806..c082b40827878 100644 --- a/src/test/codegen-units/partitioning/local-drop-glue.rs +++ b/src/test/codegen-units/partitioning/local-drop-glue.rs @@ -1,8 +1,8 @@ // ignore-tidy-linelength -// We specify -Z incremental here because we want to test the partitioning for +// We specify -C incremental here because we want to test the partitioning for // incremental compilation // We specify opt-level=0 because `drop_in_place` is `Internal` when optimizing -// compile-flags:-Zprint-mono-items=lazy -Zincremental=tmp/partitioning-tests/local-drop-glue +// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/local-drop-glue // compile-flags:-Zinline-in-all-cgus -Copt-level=0 #![allow(dead_code)] diff --git a/src/test/codegen-units/partitioning/local-generic.rs b/src/test/codegen-units/partitioning/local-generic.rs index dcff638b0b1ce..4518166a1c9ba 100644 --- a/src/test/codegen-units/partitioning/local-generic.rs +++ b/src/test/codegen-units/partitioning/local-generic.rs @@ -1,7 +1,7 @@ // ignore-tidy-linelength -// We specify -Z incremental here because we want to test the partitioning for +// We specify -C incremental here because we want to test the partitioning for // incremental compilation -// compile-flags:-Zprint-mono-items=eager -Zincremental=tmp/partitioning-tests/local-generic +// compile-flags:-Zprint-mono-items=eager -Cincremental=tmp/partitioning-tests/local-generic #![allow(dead_code)] #![crate_type="lib"] diff --git a/src/test/codegen-units/partitioning/local-inlining-but-not-all.rs b/src/test/codegen-units/partitioning/local-inlining-but-not-all.rs index 18211fad31e58..6322f55d2b740 100644 --- a/src/test/codegen-units/partitioning/local-inlining-but-not-all.rs +++ b/src/test/codegen-units/partitioning/local-inlining-but-not-all.rs @@ -1,7 +1,7 @@ // ignore-tidy-linelength -// We specify -Z incremental here because we want to test the partitioning for +// We specify -C incremental here because we want to test the partitioning for // incremental compilation -// compile-flags:-Zprint-mono-items=lazy -Zincremental=tmp/partitioning-tests/local-inlining-but-not-all +// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/local-inlining-but-not-all // compile-flags:-Zinline-in-all-cgus=no #![allow(dead_code)] diff --git a/src/test/codegen-units/partitioning/local-inlining.rs b/src/test/codegen-units/partitioning/local-inlining.rs index 7aa83e4bf4163..d75dfc91262e2 100644 --- a/src/test/codegen-units/partitioning/local-inlining.rs +++ b/src/test/codegen-units/partitioning/local-inlining.rs @@ -1,7 +1,7 @@ // ignore-tidy-linelength -// We specify -Z incremental here because we want to test the partitioning for +// We specify -C incremental here because we want to test the partitioning for // incremental compilation -// compile-flags:-Zprint-mono-items=lazy -Zincremental=tmp/partitioning-tests/local-inlining +// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/local-inlining // compile-flags:-Zinline-in-all-cgus #![allow(dead_code)] diff --git a/src/test/codegen-units/partitioning/local-transitive-inlining.rs b/src/test/codegen-units/partitioning/local-transitive-inlining.rs index 5bc56146794bf..3cf03966865e1 100644 --- a/src/test/codegen-units/partitioning/local-transitive-inlining.rs +++ b/src/test/codegen-units/partitioning/local-transitive-inlining.rs @@ -1,7 +1,7 @@ // ignore-tidy-linelength -// We specify -Z incremental here because we want to test the partitioning for +// We specify -C incremental here because we want to test the partitioning for // incremental compilation -// compile-flags:-Zprint-mono-items=lazy -Zincremental=tmp/partitioning-tests/local-transitive-inlining +// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/local-transitive-inlining // compile-flags:-Zinline-in-all-cgus #![allow(dead_code)] diff --git a/src/test/codegen-units/partitioning/methods-are-with-self-type.rs b/src/test/codegen-units/partitioning/methods-are-with-self-type.rs index c2961ed9322ad..6c55904c1bf10 100644 --- a/src/test/codegen-units/partitioning/methods-are-with-self-type.rs +++ b/src/test/codegen-units/partitioning/methods-are-with-self-type.rs @@ -4,9 +4,9 @@ // ignore-test // ignore-tidy-linelength -// We specify -Z incremental here because we want to test the partitioning for +// We specify -C incremental here because we want to test the partitioning for // incremental compilation -// compile-flags:-Zprint-mono-items=lazy -Zincremental=tmp/partitioning-tests/methods-are-with-self-type +// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/methods-are-with-self-type #![allow(dead_code)] #![feature(start)] diff --git a/src/test/codegen-units/partitioning/regular-modules.rs b/src/test/codegen-units/partitioning/regular-modules.rs index f42dc3dfc17a9..c8ceeafd0bfe9 100644 --- a/src/test/codegen-units/partitioning/regular-modules.rs +++ b/src/test/codegen-units/partitioning/regular-modules.rs @@ -1,7 +1,7 @@ // ignore-tidy-linelength -// We specify -Z incremental here because we want to test the partitioning for +// We specify -C incremental here because we want to test the partitioning for // incremental compilation -// compile-flags:-Zprint-mono-items=eager -Zincremental=tmp/partitioning-tests/regular-modules +// compile-flags:-Zprint-mono-items=eager -Cincremental=tmp/partitioning-tests/regular-modules #![allow(dead_code)] #![crate_type="lib"] diff --git a/src/test/codegen-units/partitioning/shared-generics.rs b/src/test/codegen-units/partitioning/shared-generics.rs index 47ff94437ff37..99142dd6b7e25 100644 --- a/src/test/codegen-units/partitioning/shared-generics.rs +++ b/src/test/codegen-units/partitioning/shared-generics.rs @@ -2,7 +2,7 @@ // no-prefer-dynamic // NOTE: We always compile this test with -Copt-level=0 because higher opt-levels // prevent drop-glue from participating in share-generics. -// compile-flags:-Zprint-mono-items=eager -Zshare-generics=yes -Zincremental=tmp/partitioning-tests/shared-generics-exe -Copt-level=0 +// compile-flags:-Zprint-mono-items=eager -Zshare-generics=yes -Cincremental=tmp/partitioning-tests/shared-generics-exe -Copt-level=0 #![crate_type="rlib"] diff --git a/src/test/codegen-units/partitioning/statics.rs b/src/test/codegen-units/partitioning/statics.rs index bbded480b0c15..5eac046b810d7 100644 --- a/src/test/codegen-units/partitioning/statics.rs +++ b/src/test/codegen-units/partitioning/statics.rs @@ -1,6 +1,6 @@ -// We specify -Z incremental here because we want to test the partitioning for +// We specify -C incremental here because we want to test the partitioning for // incremental compilation -// compile-flags:-Zprint-mono-items=lazy -Zincremental=tmp/partitioning-tests/statics +// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/statics #![crate_type="rlib"] diff --git a/src/test/codegen-units/partitioning/vtable-through-const.rs b/src/test/codegen-units/partitioning/vtable-through-const.rs index 06e2ef6bb2257..5a1d95d266987 100644 --- a/src/test/codegen-units/partitioning/vtable-through-const.rs +++ b/src/test/codegen-units/partitioning/vtable-through-const.rs @@ -1,8 +1,8 @@ // ignore-tidy-linelength -// We specify -Z incremental here because we want to test the partitioning for +// We specify -C incremental here because we want to test the partitioning for // incremental compilation -// compile-flags:-Zprint-mono-items=lazy -Zincremental=tmp/partitioning-tests/vtable-through-const +// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/vtable-through-const // compile-flags:-Zinline-in-all-cgus // This test case makes sure, that references made through constants are diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index faefbb1579035..4508f5b7f95f4 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -2570,12 +2570,12 @@ impl<'test> TestCx<'test> { // - if `cfail`, expect compilation to fail // - if `rfail`, expect execution to fail // - create a directory build/foo/bar.incremental - // - compile foo/bar.rs with -Z incremental=.../foo/bar.incremental and -C rpass1 + // - compile foo/bar.rs with -C incremental=.../foo/bar.incremental and -C rpass1 // - because name of revision starts with "rpass", expect success - // - compile foo/bar.rs with -Z incremental=.../foo/bar.incremental and -C cfail2 + // - compile foo/bar.rs with -C incremental=.../foo/bar.incremental and -C cfail2 // - because name of revision starts with "cfail", expect an error // - load expected errors as usual, but filter for those that end in `[rfail2]` - // - compile foo/bar.rs with -Z incremental=.../foo/bar.incremental and -C rpass3 + // - compile foo/bar.rs with -C incremental=.../foo/bar.incremental and -C rpass3 // - because name of revision starts with "rpass", expect success // - execute build/foo/bar.exe and save output //