diff options
| author | bors <bors@rust-lang.org> | 2023-01-02 13:10:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-01-02 13:10:16 +0000 |
| commit | fb9dfa8ceffb985105be3176d7ed2f99515ea377 (patch) | |
| tree | d4192d629847d9c00866eedfb28727bb1370ab86 /src | |
| parent | f89003eda8917ff99f8ee3fb5c812310a58c014b (diff) | |
| parent | 7b6ead2027d073613ff3f160f221f5d3a5941b0b (diff) | |
| download | rust-fb9dfa8ceffb985105be3176d7ed2f99515ea377.tar.gz rust-fb9dfa8ceffb985105be3176d7ed2f99515ea377.zip | |
Auto merge of #84762 - cjgillot:resolve-span-opt, r=petrochenkov
Encode spans relative to the enclosing item -- enable on nightly Follow-up to #84373 with the flag `-Zincremental-relative-spans` set by default. This PR seeks to remove one of the main shortcomings of incremental: the handling of spans. Changing the contents of a function may require redoing part of the compilation process for another function in another file because of span information is changed. Within one file: all the spans in HIR change, so typechecking had to be re-done. Between files: spans of associated types/consts/functions change, so type-based resolution needs to be re-done (hygiene information is stored in the span). The flag `-Zincremental-relative-spans` encodes local spans relative to the span of an item, stored inside the `source_span` query. Trap: stashed diagnostics are referenced by the "raw" span, so stealing them requires to remove the span's parent. In order to avoid too much traffic in the span interner, span encoding uses the `ctxt_or_tag` field to encode: - the parent when the `SyntaxContext` is 0; - the `SyntaxContext` when the parent is `None`. Even with this, the PR creates a lot of traffic to the Span interner, when a Span has both a LocalDefId parent and a non-root SyntaxContext. They appear in lowering, when we add a parent to all spans, including those which come from macros, and during inlining when we mark inlined spans. The last commit changes how queries of `LocalDefId` manage their cache. I can put this in a separate PR if required. Possible future directions: - validate that all spans are marked in HIR validation; - mark macro-expanded spans relative to the def-site and not the use-site.
Diffstat (limited to 'src')
28 files changed, 13 insertions, 120 deletions
diff --git a/src/test/incremental/change_symbol_export_status.rs b/src/test/incremental/change_symbol_export_status.rs index dd3dce4e720..83737a02200 100644 --- a/src/test/incremental/change_symbol_export_status.rs +++ b/src/test/incremental/change_symbol_export_status.rs @@ -2,8 +2,6 @@ // compile-flags: -Zquery-dep-graph // [rpass1]compile-flags: -Zincremental-ignore-spans // [rpass2]compile-flags: -Zincremental-ignore-spans -// [rpass3]compile-flags: -Zincremental-relative-spans -// [rpass4]compile-flags: -Zincremental-relative-spans #![feature(rustc_attrs)] #![rustc_partition_reused(module = "change_symbol_export_status-mod1", cfg = "rpass2")] diff --git a/src/test/incremental/hashes/call_expressions.rs b/src/test/incremental/hashes/call_expressions.rs index f3a7722cdca..65df2e8292a 100644 --- a/src/test/incremental/hashes/call_expressions.rs +++ b/src/test/incremental/hashes/call_expressions.rs @@ -11,9 +11,6 @@ // [cfail1]compile-flags: -Zincremental-ignore-spans // [cfail2]compile-flags: -Zincremental-ignore-spans // [cfail3]compile-flags: -Zincremental-ignore-spans -// [cfail4]compile-flags: -Zincremental-relative-spans -// [cfail5]compile-flags: -Zincremental-relative-spans -// [cfail6]compile-flags: -Zincremental-relative-spans #![allow(warnings)] diff --git a/src/test/incremental/hashes/closure_expressions.rs b/src/test/incremental/hashes/closure_expressions.rs index c769246b29b..7bf99f6112e 100644 --- a/src/test/incremental/hashes/closure_expressions.rs +++ b/src/test/incremental/hashes/closure_expressions.rs @@ -11,9 +11,6 @@ // [cfail1]compile-flags: -Zincremental-ignore-spans // [cfail2]compile-flags: -Zincremental-ignore-spans // [cfail3]compile-flags: -Zincremental-ignore-spans -// [cfail4]compile-flags: -Zincremental-relative-spans -// [cfail5]compile-flags: -Zincremental-relative-spans -// [cfail6]compile-flags: -Zincremental-relative-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/src/test/incremental/hashes/enum_constructors.rs b/src/test/incremental/hashes/enum_constructors.rs index 70ef10645f1..db367d07094 100644 --- a/src/test/incremental/hashes/enum_constructors.rs +++ b/src/test/incremental/hashes/enum_constructors.rs @@ -11,9 +11,6 @@ // [cfail1]compile-flags: -Zincremental-ignore-spans // [cfail2]compile-flags: -Zincremental-ignore-spans // [cfail3]compile-flags: -Zincremental-ignore-spans -// [cfail4]compile-flags: -Zincremental-relative-spans -// [cfail5]compile-flags: -Zincremental-relative-spans -// [cfail6]compile-flags: -Zincremental-relative-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/src/test/incremental/hashes/enum_defs.rs b/src/test/incremental/hashes/enum_defs.rs index 0f8898c389b..bc83723a908 100644 --- a/src/test/incremental/hashes/enum_defs.rs +++ b/src/test/incremental/hashes/enum_defs.rs @@ -16,9 +16,6 @@ // [cfail1]compile-flags: -Zincremental-ignore-spans // [cfail2]compile-flags: -Zincremental-ignore-spans // [cfail3]compile-flags: -Zincremental-ignore-spans -// [cfail4]compile-flags: -Zincremental-relative-spans -// [cfail5]compile-flags: -Zincremental-relative-spans -// [cfail6]compile-flags: -Zincremental-relative-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/src/test/incremental/hashes/exported_vs_not.rs b/src/test/incremental/hashes/exported_vs_not.rs index 87fd21fd1b8..9ac9ae24f81 100644 --- a/src/test/incremental/hashes/exported_vs_not.rs +++ b/src/test/incremental/hashes/exported_vs_not.rs @@ -4,9 +4,6 @@ // [cfail1]compile-flags: -Zincremental-ignore-spans // [cfail2]compile-flags: -Zincremental-ignore-spans // [cfail3]compile-flags: -Zincremental-ignore-spans -// [cfail4]compile-flags: -Zincremental-relative-spans -// [cfail5]compile-flags: -Zincremental-relative-spans -// [cfail6]compile-flags: -Zincremental-relative-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/src/test/incremental/hashes/extern_mods.rs b/src/test/incremental/hashes/extern_mods.rs index 3121abbea36..1906843c7a2 100644 --- a/src/test/incremental/hashes/extern_mods.rs +++ b/src/test/incremental/hashes/extern_mods.rs @@ -11,9 +11,6 @@ // [cfail1]compile-flags: -Zincremental-ignore-spans // [cfail2]compile-flags: -Zincremental-ignore-spans // [cfail3]compile-flags: -Zincremental-ignore-spans -// [cfail4]compile-flags: -Zincremental-relative-spans -// [cfail5]compile-flags: -Zincremental-relative-spans -// [cfail6]compile-flags: -Zincremental-relative-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/src/test/incremental/hashes/for_loops.rs b/src/test/incremental/hashes/for_loops.rs index 16d6af01695..193e792c843 100644 --- a/src/test/incremental/hashes/for_loops.rs +++ b/src/test/incremental/hashes/for_loops.rs @@ -11,9 +11,6 @@ // [cfail1]compile-flags: -Zincremental-ignore-spans // [cfail2]compile-flags: -Zincremental-ignore-spans // [cfail3]compile-flags: -Zincremental-ignore-spans -// [cfail4]compile-flags: -Zincremental-relative-spans -// [cfail5]compile-flags: -Zincremental-relative-spans -// [cfail6]compile-flags: -Zincremental-relative-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/src/test/incremental/hashes/function_interfaces.rs b/src/test/incremental/hashes/function_interfaces.rs index 3ff949fbb3f..182ca7d926c 100644 --- a/src/test/incremental/hashes/function_interfaces.rs +++ b/src/test/incremental/hashes/function_interfaces.rs @@ -11,9 +11,6 @@ // [cfail1]compile-flags: -Zincremental-ignore-spans // [cfail2]compile-flags: -Zincremental-ignore-spans // [cfail3]compile-flags: -Zincremental-ignore-spans -// [cfail4]compile-flags: -Zincremental-relative-spans -// [cfail5]compile-flags: -Zincremental-relative-spans -// [cfail6]compile-flags: -Zincremental-relative-spans #![allow(warnings)] #![feature(linkage)] diff --git a/src/test/incremental/hashes/if_expressions.rs b/src/test/incremental/hashes/if_expressions.rs index cff557dcb74..937fd3ac879 100644 --- a/src/test/incremental/hashes/if_expressions.rs +++ b/src/test/incremental/hashes/if_expressions.rs @@ -11,9 +11,6 @@ // [cfail1]compile-flags: -Zincremental-ignore-spans // [cfail2]compile-flags: -Zincremental-ignore-spans // [cfail3]compile-flags: -Zincremental-ignore-spans -// [cfail4]compile-flags: -Zincremental-relative-spans -// [cfail5]compile-flags: -Zincremental-relative-spans -// [cfail6]compile-flags: -Zincremental-relative-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/src/test/incremental/hashes/indexing_expressions.rs b/src/test/incremental/hashes/indexing_expressions.rs index 9ef46847243..b1ac6f6fa6c 100644 --- a/src/test/incremental/hashes/indexing_expressions.rs +++ b/src/test/incremental/hashes/indexing_expressions.rs @@ -11,9 +11,6 @@ // [cfail1]compile-flags: -Zincremental-ignore-spans // [cfail2]compile-flags: -Zincremental-ignore-spans // [cfail3]compile-flags: -Zincremental-ignore-spans -// [cfail4]compile-flags: -Zincremental-relative-spans -// [cfail5]compile-flags: -Zincremental-relative-spans -// [cfail6]compile-flags: -Zincremental-relative-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/src/test/incremental/hashes/inherent_impls.rs b/src/test/incremental/hashes/inherent_impls.rs index 1abbff32c6f..285f857c9cb 100644 --- a/src/test/incremental/hashes/inherent_impls.rs +++ b/src/test/incremental/hashes/inherent_impls.rs @@ -11,9 +11,6 @@ // [cfail1]compile-flags: -Zincremental-ignore-spans // [cfail2]compile-flags: -Zincremental-ignore-spans // [cfail3]compile-flags: -Zincremental-ignore-spans -// [cfail4]compile-flags: -Zincremental-relative-spans -// [cfail5]compile-flags: -Zincremental-relative-spans -// [cfail6]compile-flags: -Zincremental-relative-spans #![allow(warnings)] diff --git a/src/test/incremental/hashes/inline_asm.rs b/src/test/incremental/hashes/inline_asm.rs index dc878d6827c..3118aa13564 100644 --- a/src/test/incremental/hashes/inline_asm.rs +++ b/src/test/incremental/hashes/inline_asm.rs @@ -12,9 +12,6 @@ // [cfail1]compile-flags: -Zincremental-ignore-spans // [cfail2]compile-flags: -Zincremental-ignore-spans // [cfail3]compile-flags: -Zincremental-ignore-spans -// [cfail4]compile-flags: -Zincremental-relative-spans -// [cfail5]compile-flags: -Zincremental-relative-spans -// [cfail6]compile-flags: -Zincremental-relative-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/src/test/incremental/hashes/let_expressions.rs b/src/test/incremental/hashes/let_expressions.rs index 01320cd51f4..180bf6fec87 100644 --- a/src/test/incremental/hashes/let_expressions.rs +++ b/src/test/incremental/hashes/let_expressions.rs @@ -11,9 +11,6 @@ // [cfail1]compile-flags: -Zincremental-ignore-spans // [cfail2]compile-flags: -Zincremental-ignore-spans // [cfail3]compile-flags: -Zincremental-ignore-spans -// [cfail4]compile-flags: -Zincremental-relative-spans -// [cfail5]compile-flags: -Zincremental-relative-spans -// [cfail6]compile-flags: -Zincremental-relative-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/src/test/incremental/hashes/loop_expressions.rs b/src/test/incremental/hashes/loop_expressions.rs index ada541e644a..87b86479d07 100644 --- a/src/test/incremental/hashes/loop_expressions.rs +++ b/src/test/incremental/hashes/loop_expressions.rs @@ -11,9 +11,6 @@ // [cfail1]compile-flags: -Zincremental-ignore-spans // [cfail2]compile-flags: -Zincremental-ignore-spans // [cfail3]compile-flags: -Zincremental-ignore-spans -// [cfail4]compile-flags: -Zincremental-relative-spans -// [cfail5]compile-flags: -Zincremental-relative-spans -// [cfail6]compile-flags: -Zincremental-relative-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/src/test/incremental/hashes/match_expressions.rs b/src/test/incremental/hashes/match_expressions.rs index fa054c7decc..4429df6833e 100644 --- a/src/test/incremental/hashes/match_expressions.rs +++ b/src/test/incremental/hashes/match_expressions.rs @@ -11,9 +11,6 @@ // [cfail1]compile-flags: -Zincremental-ignore-spans // [cfail2]compile-flags: -Zincremental-ignore-spans // [cfail3]compile-flags: -Zincremental-ignore-spans -// [cfail4]compile-flags: -Zincremental-relative-spans -// [cfail5]compile-flags: -Zincremental-relative-spans -// [cfail6]compile-flags: -Zincremental-relative-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/src/test/incremental/hashes/statics.rs b/src/test/incremental/hashes/statics.rs index 67d87f5c4ed..bb83f8300d0 100644 --- a/src/test/incremental/hashes/statics.rs +++ b/src/test/incremental/hashes/statics.rs @@ -11,9 +11,6 @@ // [cfail1]compile-flags: -Zincremental-ignore-spans // [cfail2]compile-flags: -Zincremental-ignore-spans // [cfail3]compile-flags: -Zincremental-ignore-spans -// [cfail4]compile-flags: -Zincremental-relative-spans -// [cfail5]compile-flags: -Zincremental-relative-spans -// [cfail6]compile-flags: -Zincremental-relative-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/src/test/incremental/hashes/struct_constructors.rs b/src/test/incremental/hashes/struct_constructors.rs index fc9671cb41b..e50e5674c66 100644 --- a/src/test/incremental/hashes/struct_constructors.rs +++ b/src/test/incremental/hashes/struct_constructors.rs @@ -11,9 +11,6 @@ // [cfail1]compile-flags: -Zincremental-ignore-spans // [cfail2]compile-flags: -Zincremental-ignore-spans // [cfail3]compile-flags: -Zincremental-ignore-spans -// [cfail4]compile-flags: -Zincremental-relative-spans -// [cfail5]compile-flags: -Zincremental-relative-spans -// [cfail6]compile-flags: -Zincremental-relative-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/src/test/incremental/hashes/struct_defs.rs b/src/test/incremental/hashes/struct_defs.rs index 7a91722d70f..4a2706b4f01 100644 --- a/src/test/incremental/hashes/struct_defs.rs +++ b/src/test/incremental/hashes/struct_defs.rs @@ -16,9 +16,6 @@ // [cfail1]compile-flags: -Zincremental-ignore-spans // [cfail2]compile-flags: -Zincremental-ignore-spans // [cfail3]compile-flags: -Zincremental-ignore-spans -// [cfail4]compile-flags: -Zincremental-relative-spans -// [cfail5]compile-flags: -Zincremental-relative-spans -// [cfail6]compile-flags: -Zincremental-relative-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/src/test/incremental/hashes/trait_defs.rs b/src/test/incremental/hashes/trait_defs.rs index c453eeceb77..b583bee2f24 100644 --- a/src/test/incremental/hashes/trait_defs.rs +++ b/src/test/incremental/hashes/trait_defs.rs @@ -16,9 +16,6 @@ // [cfail1]compile-flags: -Zincremental-ignore-spans // [cfail2]compile-flags: -Zincremental-ignore-spans // [cfail3]compile-flags: -Zincremental-ignore-spans -// [cfail4]compile-flags: -Zincremental-relative-spans -// [cfail5]compile-flags: -Zincremental-relative-spans -// [cfail6]compile-flags: -Zincremental-relative-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/src/test/incremental/hashes/trait_impls.rs b/src/test/incremental/hashes/trait_impls.rs index f555f555f92..3b2e18d17a9 100644 --- a/src/test/incremental/hashes/trait_impls.rs +++ b/src/test/incremental/hashes/trait_impls.rs @@ -11,9 +11,6 @@ // [cfail1]compile-flags: -Zincremental-ignore-spans // [cfail2]compile-flags: -Zincremental-ignore-spans // [cfail3]compile-flags: -Zincremental-ignore-spans -// [cfail4]compile-flags: -Zincremental-relative-spans -// [cfail5]compile-flags: -Zincremental-relative-spans -// [cfail6]compile-flags: -Zincremental-relative-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/src/test/incremental/hashes/unary_and_binary_exprs.rs b/src/test/incremental/hashes/unary_and_binary_exprs.rs index 18fb716353f..58af51eef07 100644 --- a/src/test/incremental/hashes/unary_and_binary_exprs.rs +++ b/src/test/incremental/hashes/unary_and_binary_exprs.rs @@ -11,9 +11,6 @@ // [cfail1]compile-flags: -Zincremental-ignore-spans // [cfail2]compile-flags: -Zincremental-ignore-spans // [cfail3]compile-flags: -Zincremental-ignore-spans -// [cfail4]compile-flags: -Zincremental-relative-spans -// [cfail5]compile-flags: -Zincremental-relative-spans -// [cfail6]compile-flags: -Zincremental-relative-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/src/test/incremental/hashes/while_let_loops.rs b/src/test/incremental/hashes/while_let_loops.rs index 88fd4d89b28..c81b0d0afb8 100644 --- a/src/test/incremental/hashes/while_let_loops.rs +++ b/src/test/incremental/hashes/while_let_loops.rs @@ -11,9 +11,6 @@ // [cfail1]compile-flags: -Zincremental-ignore-spans // [cfail2]compile-flags: -Zincremental-ignore-spans // [cfail3]compile-flags: -Zincremental-ignore-spans -// [cfail4]compile-flags: -Zincremental-relative-spans -// [cfail5]compile-flags: -Zincremental-relative-spans -// [cfail6]compile-flags: -Zincremental-relative-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/src/test/incremental/hashes/while_loops.rs b/src/test/incremental/hashes/while_loops.rs index 9b4d23757b8..c1cc0b62bc2 100644 --- a/src/test/incremental/hashes/while_loops.rs +++ b/src/test/incremental/hashes/while_loops.rs @@ -11,9 +11,6 @@ // [cfail1]compile-flags: -Zincremental-ignore-spans // [cfail2]compile-flags: -Zincremental-ignore-spans // [cfail3]compile-flags: -Zincremental-ignore-spans -// [cfail4]compile-flags: -Zincremental-relative-spans -// [cfail5]compile-flags: -Zincremental-relative-spans -// [cfail6]compile-flags: -Zincremental-relative-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/src/test/incremental/spans_significant_w_debuginfo.rs b/src/test/incremental/spans_significant_w_debuginfo.rs index 639454cc975..38ab2846191 100644 --- a/src/test/incremental/spans_significant_w_debuginfo.rs +++ b/src/test/incremental/spans_significant_w_debuginfo.rs @@ -1,21 +1,17 @@ // This test makes sure that just changing a definition's location in the // source file also changes its incr. comp. hash, if debuginfo is enabled. -// revisions:rpass1 rpass2 rpass3 rpass4 +// revisions:rpass1 rpass2 // ignore-asmjs wasm2js does not support source maps yet // compile-flags: -g -Z query-dep-graph -// [rpass3]compile-flags: -Zincremental-relative-spans -// [rpass4]compile-flags: -Zincremental-relative-spans #![feature(rustc_attrs)] #![rustc_partition_codegened(module = "spans_significant_w_debuginfo", cfg = "rpass2")] -#![rustc_partition_codegened(module = "spans_significant_w_debuginfo", cfg = "rpass4")] -#[cfg(any(rpass1, rpass3))] +#[cfg(rpass1)] pub fn main() {} -#[cfg(any(rpass2, rpass4))] -#[rustc_clean(except = "hir_owner,hir_owner_nodes,optimized_mir", cfg = "rpass2")] -#[rustc_clean(cfg = "rpass4")] +#[cfg(rpass2)] +#[rustc_clean(cfg = "rpass2")] pub fn main() {} diff --git a/src/test/incremental/spans_significant_w_panic.rs b/src/test/incremental/spans_significant_w_panic.rs index 6f51c9729e3..085e4cd78ca 100644 --- a/src/test/incremental/spans_significant_w_panic.rs +++ b/src/test/incremental/spans_significant_w_panic.rs @@ -1,26 +1,22 @@ // This test makes sure that just changing a definition's location in the // source file also changes its incr. comp. hash, if debuginfo is enabled. -// revisions:rpass1 rpass2 rpass3 rpass4 -// [rpass3]compile-flags: -Zincremental-relative-spans -// [rpass4]compile-flags: -Zincremental-relative-spans +// revisions:rpass1 rpass2 // compile-flags: -C overflow-checks=on -Z query-dep-graph #![feature(rustc_attrs)] #![rustc_partition_codegened(module = "spans_significant_w_panic", cfg = "rpass2")] -#![rustc_partition_codegened(module = "spans_significant_w_panic", cfg = "rpass4")] -#[cfg(any(rpass1, rpass3))] +#[cfg(rpass1)] pub fn main() { if std::hint::black_box(false) { panic!() } } -#[cfg(any(rpass2, rpass4))] -#[rustc_clean(except = "hir_owner,hir_owner_nodes,optimized_mir", cfg = "rpass2")] -#[rustc_clean(cfg = "rpass4")] +#[cfg(rpass2)] +#[rustc_clean(cfg = "rpass2")] pub fn main() { if std::hint::black_box(false) { panic!() diff --git a/src/test/incremental/string_constant.rs b/src/test/incremental/string_constant.rs index cae7b4aab75..e15a8d18f85 100644 --- a/src/test/incremental/string_constant.rs +++ b/src/test/incremental/string_constant.rs @@ -1,7 +1,5 @@ -// revisions: cfail1 cfail2 cfail3 cfail4 +// revisions: cfail1 cfail2 // compile-flags: -Z query-dep-graph -// [cfail3]compile-flags: -Zincremental-relative-spans -// [cfail4]compile-flags: -Zincremental-relative-spans // build-pass (FIXME(62277): could be check-pass?) #![allow(warnings)] @@ -13,14 +11,13 @@ // needed even for callers of `x`. pub mod x { - #[cfg(any(cfail1, cfail3))] + #[cfg(cfail1)] pub fn x() { println!("{}", "1"); } - #[cfg(any(cfail2, cfail4))] - #[rustc_clean(except = "hir_owner,hir_owner_nodes,optimized_mir,promoted_mir", cfg = "cfail2")] - #[rustc_clean(except = "hir_owner_nodes,promoted_mir", cfg = "cfail4")] + #[cfg(cfail2)] + #[rustc_clean(except = "hir_owner_nodes,promoted_mir", cfg = "cfail2")] pub fn x() { println!("{}", "2"); } @@ -30,7 +27,6 @@ pub mod y { use x; #[rustc_clean(cfg = "cfail2")] - #[rustc_clean(cfg = "cfail4")] pub fn y() { x::x(); } @@ -40,7 +36,6 @@ pub mod z { use y; #[rustc_clean(cfg = "cfail2")] - #[rustc_clean(cfg = "cfail4")] pub fn z() { y::y(); } diff --git a/src/test/incremental/thinlto/cgu_keeps_identical_fn.rs b/src/test/incremental/thinlto/cgu_keeps_identical_fn.rs index 31f329a7f72..368a726ea90 100644 --- a/src/test/incremental/thinlto/cgu_keeps_identical_fn.rs +++ b/src/test/incremental/thinlto/cgu_keeps_identical_fn.rs @@ -3,10 +3,7 @@ // ends up with any spans in its LLVM bitecode, so LLVM is able to skip // re-building any modules which import 'inlined_fn' -// revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 -// [cfail4]compile-flags: -Zincremental-relative-spans -// [cfail5]compile-flags: -Zincremental-relative-spans -// [cfail6]compile-flags: -Zincremental-relative-spans +// revisions: cfail1 cfail2 cfail3 // compile-flags: -Z query-dep-graph -O // build-pass (FIXME(62277): could be check-pass?) @@ -19,16 +16,6 @@ kind = "post-lto" )] #![rustc_expected_cgu_reuse( - module = "cgu_keeps_identical_fn-foo", - cfg = "cfail5", - kind = "post-lto" -)] -#![rustc_expected_cgu_reuse( - module = "cgu_keeps_identical_fn-foo", - cfg = "cfail6", - kind = "post-lto" -)] -#![rustc_expected_cgu_reuse( module = "cgu_keeps_identical_fn-bar", cfg = "cfail2", kind = "post-lto" @@ -38,16 +25,6 @@ cfg = "cfail3", kind = "post-lto" )] -#![rustc_expected_cgu_reuse( - module = "cgu_keeps_identical_fn-bar", - cfg = "cfail5", - kind = "post-lto" -)] -#![rustc_expected_cgu_reuse( - module = "cgu_keeps_identical_fn-bar", - cfg = "cfail6", - kind = "post-lto" -)] mod foo { |
