diff --git a/tests/incremental/add_private_fn_at_krate_root_cc/struct_point.rs b/tests/incremental/add_private_fn_at_krate_root_cc/struct_point.rs index 6cfc35728a0e..066dbf4ff439 100644 --- a/tests/incremental/add_private_fn_at_krate_root_cc/struct_point.rs +++ b/tests/incremental/add_private_fn_at_krate_root_cc/struct_point.rs @@ -2,21 +2,20 @@ // crate. This should not cause anything we use to be invalidated. // Regression test for #36168. -//@ revisions: bfail1 bfail2 +//@ revisions: bpass1 bpass2 //@ compile-flags: -Z query-dep-graph //@ aux-build:point.rs -//@ build-pass //@ ignore-backends: gcc #![feature(rustc_attrs)] #![allow(dead_code)] #![crate_type = "rlib"] -#![rustc_partition_reused(module="struct_point-fn_calls_methods_in_same_impl", cfg="bfail2")] -#![rustc_partition_reused(module="struct_point-fn_calls_free_fn", cfg="bfail2")] -#![rustc_partition_reused(module="struct_point-fn_read_field", cfg="bfail2")] -#![rustc_partition_reused(module="struct_point-fn_write_field", cfg="bfail2")] -#![rustc_partition_reused(module="struct_point-fn_make_struct", cfg="bfail2")] +#![rustc_partition_reused(module="struct_point-fn_calls_methods_in_same_impl", cfg="bpass2")] +#![rustc_partition_reused(module="struct_point-fn_calls_free_fn", cfg="bpass2")] +#![rustc_partition_reused(module="struct_point-fn_read_field", cfg="bpass2")] +#![rustc_partition_reused(module="struct_point-fn_write_field", cfg="bpass2")] +#![rustc_partition_reused(module="struct_point-fn_make_struct", cfg="bpass2")] extern crate point; @@ -24,7 +23,7 @@ pub mod fn_calls_methods_in_same_impl { use point::Point; - #[rustc_clean(cfg="bfail2")] + #[rustc_clean(cfg="bpass2")] pub fn check() { let x = Point { x: 2.0, y: 2.0 }; x.distance_from_origin(); @@ -35,7 +34,7 @@ pub fn check() { pub mod fn_calls_free_fn { use point::{self, Point}; - #[rustc_clean(cfg="bfail2")] + #[rustc_clean(cfg="bpass2")] pub fn check() { let x = Point { x: 2.0, y: 2.0 }; point::distance_squared(&x); @@ -46,7 +45,7 @@ pub fn check() { pub mod fn_make_struct { use point::Point; - #[rustc_clean(cfg="bfail2")] + #[rustc_clean(cfg="bpass2")] pub fn make_origin() -> Point { Point { x: 2.0, y: 2.0 } } @@ -56,7 +55,7 @@ pub fn make_origin() -> Point { pub mod fn_read_field { use point::Point; - #[rustc_clean(cfg="bfail2")] + #[rustc_clean(cfg="bpass2")] pub fn get_x(p: Point) -> f32 { p.x } @@ -66,7 +65,7 @@ pub fn get_x(p: Point) -> f32 { pub mod fn_write_field { use point::Point; - #[rustc_clean(cfg="bfail2")] + #[rustc_clean(cfg="bpass2")] pub fn inc_x(p: &mut Point) { p.x += 1.0; } diff --git a/tests/incremental/change_add_field/struct_point.rs b/tests/incremental/change_add_field/struct_point.rs index 06543588ccd8..59130323b332 100644 --- a/tests/incremental/change_add_field/struct_point.rs +++ b/tests/incremental/change_add_field/struct_point.rs @@ -3,9 +3,8 @@ // Fns with that type used only in their body are also recompiled, but // their callers are not. -//@ revisions: bfail1 bfail2 +//@ revisions: bpass1 bpass2 //@ compile-flags: -Z query-dep-graph -//@ build-pass //@ ignore-backends: gcc #![feature(rustc_attrs)] @@ -13,24 +12,24 @@ #![crate_type = "rlib"] // These are expected to require codegen. -#![rustc_partition_codegened(module="struct_point-point", cfg="bfail2")] -#![rustc_partition_codegened(module="struct_point-fn_with_type_in_sig", cfg="bfail2")] -#![rustc_partition_codegened(module="struct_point-call_fn_with_type_in_sig", cfg="bfail2")] -#![rustc_partition_codegened(module="struct_point-fn_with_type_in_body", cfg="bfail2")] -#![rustc_partition_codegened(module="struct_point-fn_make_struct", cfg="bfail2")] -#![rustc_partition_codegened(module="struct_point-fn_read_field", cfg="bfail2")] -#![rustc_partition_codegened(module="struct_point-fn_write_field", cfg="bfail2")] +#![rustc_partition_codegened(module="struct_point-point", cfg="bpass2")] +#![rustc_partition_codegened(module="struct_point-fn_with_type_in_sig", cfg="bpass2")] +#![rustc_partition_codegened(module="struct_point-call_fn_with_type_in_sig", cfg="bpass2")] +#![rustc_partition_codegened(module="struct_point-fn_with_type_in_body", cfg="bpass2")] +#![rustc_partition_codegened(module="struct_point-fn_make_struct", cfg="bpass2")] +#![rustc_partition_codegened(module="struct_point-fn_read_field", cfg="bpass2")] +#![rustc_partition_codegened(module="struct_point-fn_write_field", cfg="bpass2")] -#![rustc_partition_reused(module="struct_point-call_fn_with_type_in_body", cfg="bfail2")] +#![rustc_partition_reused(module="struct_point-call_fn_with_type_in_body", cfg="bpass2")] pub mod point { - #[cfg(bfail1)] + #[cfg(bpass1)] pub struct Point { pub x: f32, pub y: f32, } - #[cfg(bfail2)] + #[cfg(bpass2)] pub struct Point { pub x: f32, pub y: f32, @@ -39,18 +38,18 @@ pub struct Point { impl Point { pub fn origin() -> Point { - #[cfg(bfail1)] + #[cfg(bpass1)] return Point { x: 0.0, y: 0.0 }; - #[cfg(bfail2)] + #[cfg(bpass2)] return Point { x: 0.0, y: 0.0, z: 0.0 }; } pub fn total(&self) -> f32 { - #[cfg(bfail1)] + #[cfg(bpass1)] return self.x + self.y; - #[cfg(bfail2)] + #[cfg(bpass2)] return self.x + self.y + self.z; } @@ -70,7 +69,7 @@ pub fn x(&self) -> f32 { pub mod fn_with_type_in_sig { use point::Point; - #[rustc_clean(except="typeck_root,fn_sig,optimized_mir", cfg="bfail2")] + #[rustc_clean(except="typeck_root,fn_sig,optimized_mir", cfg="bpass2")] pub fn boop(p: Option<&Point>) -> f32 { p.map(|p| p.total()).unwrap_or(0.0) } @@ -86,7 +85,7 @@ pub fn boop(p: Option<&Point>) -> f32 { pub mod call_fn_with_type_in_sig { use fn_with_type_in_sig; - #[rustc_clean(except="typeck_root,optimized_mir", cfg="bfail2")] + #[rustc_clean(except="typeck_root,optimized_mir", cfg="bpass2")] pub fn bip() -> f32 { fn_with_type_in_sig::boop(None) } @@ -102,7 +101,7 @@ pub fn bip() -> f32 { pub mod fn_with_type_in_body { use point::Point; - #[rustc_clean(except="typeck_root,optimized_mir", cfg="bfail2")] + #[rustc_clean(except="typeck_root,optimized_mir", cfg="bpass2")] pub fn boop() -> f32 { Point::origin().total() } @@ -115,7 +114,7 @@ pub fn boop() -> f32 { pub mod call_fn_with_type_in_body { use fn_with_type_in_body; - #[rustc_clean(cfg="bfail2")] + #[rustc_clean(cfg="bpass2")] pub fn bip() -> f32 { fn_with_type_in_body::boop() } @@ -125,7 +124,7 @@ pub fn bip() -> f32 { pub mod fn_make_struct { use point::Point; - #[rustc_clean(except="typeck_root,fn_sig,optimized_mir", cfg="bfail2")] + #[rustc_clean(except="typeck_root,fn_sig,optimized_mir", cfg="bpass2")] pub fn make_origin(p: Point) -> Point { Point { ..p } } @@ -135,7 +134,7 @@ pub fn make_origin(p: Point) -> Point { pub mod fn_read_field { use point::Point; - #[rustc_clean(except="typeck_root,fn_sig,optimized_mir", cfg="bfail2")] + #[rustc_clean(except="typeck_root,fn_sig,optimized_mir", cfg="bpass2")] pub fn get_x(p: Point) -> f32 { p.x } @@ -145,7 +144,7 @@ pub fn get_x(p: Point) -> f32 { pub mod fn_write_field { use point::Point; - #[rustc_clean(except="typeck_root,fn_sig,optimized_mir", cfg="bfail2")] + #[rustc_clean(except="typeck_root,fn_sig,optimized_mir", cfg="bpass2")] pub fn inc_x(p: &mut Point) { p.x += 1.0; } diff --git a/tests/incremental/change_private_impl_method/struct_point.rs b/tests/incremental/change_private_impl_method/struct_point.rs index f2c870141963..a5ecb784c0c9 100644 --- a/tests/incremental/change_private_impl_method/struct_point.rs +++ b/tests/incremental/change_private_impl_method/struct_point.rs @@ -1,22 +1,21 @@ // Test where we change the body of a private method in an impl. // We then test what sort of functions must be rebuilt as a result. -//@ revisions: bfail1 bfail2 +//@ revisions: bpass1 bpass2 //@ compile-flags: -Z query-dep-graph -//@ build-pass //@ ignore-backends: gcc #![feature(rustc_attrs)] #![allow(dead_code)] #![crate_type = "rlib"] -#![rustc_partition_codegened(module="struct_point-point", cfg="bfail2")] +#![rustc_partition_codegened(module="struct_point-point", cfg="bpass2")] -#![rustc_partition_reused(module="struct_point-fn_calls_methods_in_same_impl", cfg="bfail2")] -#![rustc_partition_reused(module="struct_point-fn_calls_methods_in_another_impl", cfg="bfail2")] -#![rustc_partition_reused(module="struct_point-fn_make_struct", cfg="bfail2")] -#![rustc_partition_reused(module="struct_point-fn_read_field", cfg="bfail2")] -#![rustc_partition_reused(module="struct_point-fn_write_field", cfg="bfail2")] +#![rustc_partition_reused(module="struct_point-fn_calls_methods_in_same_impl", cfg="bpass2")] +#![rustc_partition_reused(module="struct_point-fn_calls_methods_in_another_impl", cfg="bpass2")] +#![rustc_partition_reused(module="struct_point-fn_make_struct", cfg="bpass2")] +#![rustc_partition_reused(module="struct_point-fn_read_field", cfg="bpass2")] +#![rustc_partition_reused(module="struct_point-fn_write_field", cfg="bpass2")] pub mod point { pub struct Point { @@ -26,10 +25,10 @@ pub struct Point { impl Point { pub fn distance_squared(&self) -> f32 { - #[cfg(bfail1)] + #[cfg(bpass1)] return self.x + self.y; - #[cfg(bfail2)] + #[cfg(bpass2)] return self.x * self.x + self.y * self.y; } @@ -51,7 +50,7 @@ pub fn translate(&mut self, x: f32, y: f32) { pub mod fn_calls_methods_in_same_impl { use point::Point; - #[rustc_clean(cfg="bfail2")] + #[rustc_clean(cfg="bpass2")] pub fn check() { let x = Point { x: 2.0, y: 2.0 }; x.distance_from_origin(); @@ -62,7 +61,7 @@ pub fn check() { pub mod fn_calls_methods_in_another_impl { use point::Point; - #[rustc_clean(cfg="bfail2")] + #[rustc_clean(cfg="bpass2")] pub fn check() { let mut x = Point { x: 2.0, y: 2.0 }; x.translate(3.0, 3.0); @@ -73,7 +72,7 @@ pub fn check() { pub mod fn_make_struct { use point::Point; - #[rustc_clean(cfg="bfail2")] + #[rustc_clean(cfg="bpass2")] pub fn make_origin() -> Point { Point { x: 2.0, y: 2.0 } } @@ -83,7 +82,7 @@ pub fn make_origin() -> Point { pub mod fn_read_field { use point::Point; - #[rustc_clean(cfg="bfail2")] + #[rustc_clean(cfg="bpass2")] pub fn get_x(p: Point) -> f32 { p.x } @@ -93,7 +92,7 @@ pub fn get_x(p: Point) -> f32 { pub mod fn_write_field { use point::Point; - #[rustc_clean(cfg="bfail2")] + #[rustc_clean(cfg="bpass2")] pub fn inc_x(p: &mut Point) { p.x += 1.0; } diff --git a/tests/incremental/change_pub_inherent_method_body/struct_point.rs b/tests/incremental/change_pub_inherent_method_body/struct_point.rs index ef1c95a1e77f..0538dae2d4ed 100644 --- a/tests/incremental/change_pub_inherent_method_body/struct_point.rs +++ b/tests/incremental/change_pub_inherent_method_body/struct_point.rs @@ -1,21 +1,20 @@ // Test where we change the body of a public, inherent method. -//@ revisions: bfail1 bfail2 +//@ revisions: bpass1 bpass2 //@ compile-flags: -Z query-dep-graph -//@ build-pass //@ ignore-backends: gcc #![crate_type = "rlib"] #![feature(rustc_attrs)] #![allow(dead_code)] -#![rustc_partition_codegened(module="struct_point-point", cfg="bfail2")] +#![rustc_partition_codegened(module="struct_point-point", cfg="bpass2")] -#![rustc_partition_reused(module="struct_point-fn_calls_changed_method", cfg="bfail2")] -#![rustc_partition_reused(module="struct_point-fn_calls_another_method", cfg="bfail2")] -#![rustc_partition_reused(module="struct_point-fn_make_struct", cfg="bfail2")] -#![rustc_partition_reused(module="struct_point-fn_read_field", cfg="bfail2")] -#![rustc_partition_reused(module="struct_point-fn_write_field", cfg="bfail2")] +#![rustc_partition_reused(module="struct_point-fn_calls_changed_method", cfg="bpass2")] +#![rustc_partition_reused(module="struct_point-fn_calls_another_method", cfg="bpass2")] +#![rustc_partition_reused(module="struct_point-fn_make_struct", cfg="bpass2")] +#![rustc_partition_reused(module="struct_point-fn_read_field", cfg="bpass2")] +#![rustc_partition_reused(module="struct_point-fn_write_field", cfg="bpass2")] pub mod point { pub struct Point { @@ -25,10 +24,10 @@ pub struct Point { impl Point { pub fn distance_from_origin(&self) -> f32 { - #[cfg(bfail1)] + #[cfg(bpass1)] return self.x * self.x + self.y * self.y; - #[cfg(bfail2)] + #[cfg(bpass2)] return (self.x * self.x + self.y * self.y).sqrt(); } @@ -42,7 +41,7 @@ pub fn x(&self) -> f32 { pub mod fn_calls_changed_method { use point::Point; - #[rustc_clean(cfg="bfail2")] + #[rustc_clean(cfg="bpass2")] pub fn check() { let p = Point { x: 2.0, y: 2.0 }; p.distance_from_origin(); @@ -53,7 +52,7 @@ pub fn check() { pub mod fn_calls_another_method { use point::Point; - #[rustc_clean(cfg="bfail2")] + #[rustc_clean(cfg="bpass2")] pub fn check() { let p = Point { x: 2.0, y: 2.0 }; p.x(); @@ -64,7 +63,7 @@ pub fn check() { pub mod fn_make_struct { use point::Point; - #[rustc_clean(cfg="bfail2")] + #[rustc_clean(cfg="bpass2")] pub fn make_origin() -> Point { Point { x: 2.0, y: 2.0 } } @@ -74,7 +73,7 @@ pub fn make_origin() -> Point { pub mod fn_read_field { use point::Point; - #[rustc_clean(cfg="bfail2")] + #[rustc_clean(cfg="bpass2")] pub fn get_x(p: Point) -> f32 { p.x } @@ -84,7 +83,7 @@ pub fn get_x(p: Point) -> f32 { pub mod fn_write_field { use point::Point; - #[rustc_clean(cfg="bfail2")] + #[rustc_clean(cfg="bpass2")] pub fn inc_x(p: &mut Point) { p.x += 1.0; } diff --git a/tests/incremental/change_pub_inherent_method_sig/struct_point.rs b/tests/incremental/change_pub_inherent_method_sig/struct_point.rs index 41da1f401878..5b4bb2ee4c76 100644 --- a/tests/incremental/change_pub_inherent_method_sig/struct_point.rs +++ b/tests/incremental/change_pub_inherent_method_sig/struct_point.rs @@ -1,8 +1,7 @@ // Test where we change the *signature* of a public, inherent method. -//@ revisions: bfail1 bfail2 +//@ revisions: bpass1 bpass2 //@ compile-flags: -Z query-dep-graph -//@ build-pass //@ ignore-backends: gcc #![crate_type = "rlib"] @@ -10,13 +9,13 @@ #![allow(dead_code)] // These are expected to require codegen. -#![rustc_partition_codegened(module="struct_point-point", cfg="bfail2")] -#![rustc_partition_codegened(module="struct_point-fn_calls_changed_method", cfg="bfail2")] +#![rustc_partition_codegened(module="struct_point-point", cfg="bpass2")] +#![rustc_partition_codegened(module="struct_point-fn_calls_changed_method", cfg="bpass2")] -#![rustc_partition_reused(module="struct_point-fn_calls_another_method", cfg="bfail2")] -#![rustc_partition_reused(module="struct_point-fn_make_struct", cfg="bfail2")] -#![rustc_partition_reused(module="struct_point-fn_read_field", cfg="bfail2")] -#![rustc_partition_reused(module="struct_point-fn_write_field", cfg="bfail2")] +#![rustc_partition_reused(module="struct_point-fn_calls_another_method", cfg="bpass2")] +#![rustc_partition_reused(module="struct_point-fn_make_struct", cfg="bpass2")] +#![rustc_partition_reused(module="struct_point-fn_read_field", cfg="bpass2")] +#![rustc_partition_reused(module="struct_point-fn_write_field", cfg="bpass2")] pub mod point { pub struct Point { @@ -25,7 +24,7 @@ pub struct Point { } impl Point { - #[cfg(bfail1)] + #[cfg(bpass1)] pub fn distance_from_point(&self, p: Option) -> f32 { let p = p.unwrap_or(Point { x: 0.0, y: 0.0 }); let x_diff = self.x - p.x; @@ -33,7 +32,7 @@ pub fn distance_from_point(&self, p: Option) -> f32 { return x_diff * x_diff + y_diff * y_diff; } - #[cfg(bfail2)] + #[cfg(bpass2)] pub fn distance_from_point(&self, p: Option<&Point>) -> f32 { const ORIGIN: &Point = &Point { x: 0.0, y: 0.0 }; let p = p.unwrap_or(ORIGIN); @@ -52,7 +51,7 @@ pub fn x(&self) -> f32 { pub mod fn_calls_changed_method { use point::Point; - #[rustc_clean(except="typeck_root,optimized_mir", cfg="bfail2")] + #[rustc_clean(except="typeck_root,optimized_mir", cfg="bpass2")] pub fn check() { let p = Point { x: 2.0, y: 2.0 }; p.distance_from_point(None); @@ -63,7 +62,7 @@ pub fn check() { pub mod fn_calls_another_method { use point::Point; - #[rustc_clean(cfg="bfail2")] + #[rustc_clean(cfg="bpass2")] pub fn check() { let p = Point { x: 2.0, y: 2.0 }; p.x(); @@ -74,7 +73,7 @@ pub fn check() { pub mod fn_make_struct { use point::Point; - #[rustc_clean(cfg="bfail2")] + #[rustc_clean(cfg="bpass2")] pub fn make_origin() -> Point { Point { x: 2.0, y: 2.0 } } @@ -84,7 +83,7 @@ pub fn make_origin() -> Point { pub mod fn_read_field { use point::Point; - #[rustc_clean(cfg="bfail2")] + #[rustc_clean(cfg="bpass2")] pub fn get_x(p: Point) -> f32 { p.x } @@ -94,7 +93,7 @@ pub fn get_x(p: Point) -> f32 { pub mod fn_write_field { use point::Point; - #[rustc_clean(cfg="bfail2")] + #[rustc_clean(cfg="bpass2")] pub fn inc_x(p: &mut Point) { p.x += 1.0; } diff --git a/tests/incremental/issue-49595/issue-49595.rs b/tests/incremental/issue-49595/issue-49595.rs index 844199ae7336..b2c4125f7890 100644 --- a/tests/incremental/issue-49595/issue-49595.rs +++ b/tests/incremental/issue-49595/issue-49595.rs @@ -1,16 +1,15 @@ -//@ revisions: bfail1 bfail2 bfail3 +//@ revisions: bpass1 bpass2 bpass3 //@ compile-flags: -Z query-dep-graph --test -//@ build-pass //@ ignore-backends: gcc #![feature(rustc_attrs)] #![crate_type = "rlib"] -#![rustc_partition_codegened(module="issue_49595-tests", cfg="bfail2")] -#![rustc_partition_codegened(module="issue_49595-lit_test", cfg="bfail3")] +#![rustc_partition_codegened(module="issue_49595-tests", cfg="bpass2")] +#![rustc_partition_codegened(module="issue_49595-lit_test", cfg="bpass3")] mod tests { - #[cfg_attr(not(bfail1), test)] + #[cfg_attr(not(bpass1), test)] fn _test() { } } @@ -20,8 +19,8 @@ fn _test() { // takes effect. // replacing a module to have a stable span -#[cfg_attr(not(bfail3), path = "auxiliary/lit_a.rs")] -#[cfg_attr(bfail3, path = "auxiliary/lit_b.rs")] +#[cfg_attr(not(bpass3), path = "auxiliary/lit_a.rs")] +#[cfg_attr(bpass3, path = "auxiliary/lit_b.rs")] mod lit; pub mod lit_test { diff --git a/tests/incremental/issue-84252-global-alloc.rs b/tests/incremental/issue-84252-global-alloc.rs index 21d64395c228..f035f209daa5 100644 --- a/tests/incremental/issue-84252-global-alloc.rs +++ b/tests/incremental/issue-84252-global-alloc.rs @@ -1,5 +1,4 @@ -//@ revisions: bfail1 bfail2 -//@ build-pass +//@ revisions: bpass1 bpass2 //@ needs-crate-type: cdylib #![crate_type="lib"] @@ -8,6 +7,6 @@ #[allow(unused_imports)] use std::alloc::System; -#[cfg(bfail1)] +#[cfg(bpass1)] #[global_allocator] static ALLOC: System = System; diff --git a/tests/incremental/issue-85360-eval-obligation-ice.rs b/tests/incremental/issue-85360-eval-obligation-ice.rs index 84b6e1ace7d0..0066c6ffc99a 100644 --- a/tests/incremental/issue-85360-eval-obligation-ice.rs +++ b/tests/incremental/issue-85360-eval-obligation-ice.rs @@ -1,8 +1,7 @@ -//@ revisions: bfail1 bfail2 -//@[bfail1] compile-flags: --crate-type=lib -Zassert-incr-state=not-loaded -//@[bfail2] compile-flags: --crate-type=lib -Zassert-incr-state=loaded +//@ revisions: bpass1 bpass2 +//@[bpass1] compile-flags: --crate-type=lib -Zassert-incr-state=not-loaded +//@[bpass2] compile-flags: --crate-type=lib -Zassert-incr-state=loaded //@ edition: 2021 -//@ build-pass //@ ignore-backends: gcc #![allow(dead_code)] diff --git a/tests/incremental/lto-in-linker.rs b/tests/incremental/lto-in-linker.rs index 6fae5b8cb275..50f4e1f36a92 100644 --- a/tests/incremental/lto-in-linker.rs +++ b/tests/incremental/lto-in-linker.rs @@ -1,9 +1,8 @@ -//@ revisions: bfail1 bfail2 +//@ revisions: bpass1 bpass2 //@ compile-flags: -Z query-dep-graph --crate-type rlib -C linker-plugin-lto -O //@ no-prefer-dynamic -//@ build-pass #![feature(rustc_attrs)] -#![rustc_partition_reused(module = "lto_in_linker", cfg = "bfail2")] +#![rustc_partition_reused(module = "lto_in_linker", cfg = "bpass2")] pub fn foo() {} diff --git a/tests/incremental/rlib-lto.rs b/tests/incremental/rlib-lto.rs index 8f15f6ffc347..233c956f85da 100644 --- a/tests/incremental/rlib-lto.rs +++ b/tests/incremental/rlib-lto.rs @@ -1,8 +1,7 @@ -//@ revisions: bfail1 bfail2 +//@ revisions: bpass1 bpass2 //@ compile-flags: -Z query-dep-graph --crate-type rlib -C lto -//@ build-pass #![feature(rustc_attrs)] -#![rustc_partition_reused(module = "rlib_lto", cfg = "bfail2")] +#![rustc_partition_reused(module = "rlib_lto", cfg = "bpass2")] pub fn foo() {} diff --git a/tests/incremental/thinlto/cgu_invalidated_via_import.rs b/tests/incremental/thinlto/cgu_invalidated_via_import.rs index a29e0a5f74f0..240f0750d0b0 100644 --- a/tests/incremental/thinlto/cgu_invalidated_via_import.rs +++ b/tests/incremental/thinlto/cgu_invalidated_via_import.rs @@ -2,37 +2,36 @@ // via ThinLTO and that imported thing changes while the definition of the CGU // stays untouched. -//@ revisions: bfail1 bfail2 bfail3 +//@ revisions: bpass1 bpass2 bpass3 //@ compile-flags: -Z query-dep-graph -O -//@ build-pass //@ ignore-backends: gcc #![feature(rustc_attrs)] #![crate_type="rlib"] #![rustc_expected_cgu_reuse(module="cgu_invalidated_via_import-foo", - cfg="bfail2", + cfg="bpass2", kind="no")] #![rustc_expected_cgu_reuse(module="cgu_invalidated_via_import-foo", - cfg="bfail3", + cfg="bpass3", kind="pre-lto")] // Should be "post-lto", see issue #119076 #![rustc_expected_cgu_reuse(module="cgu_invalidated_via_import-bar", - cfg="bfail2", + cfg="bpass2", kind="pre-lto")] #![rustc_expected_cgu_reuse(module="cgu_invalidated_via_import-bar", - cfg="bfail3", + cfg="bpass3", kind="pre-lto")] // Should be "post-lto", see issue #119076 mod foo { // Trivial functions like this one are imported very reliably by ThinLTO. - #[cfg(bfail1)] + #[cfg(bpass1)] pub fn inlined_fn() -> u32 { 1234 } - #[cfg(not(bfail1))] + #[cfg(not(bpass1))] pub fn inlined_fn() -> u32 { // See `cgu_keeps_identical_fn.rs` for why this is different // from the other version of this function. diff --git a/tests/incremental/thinlto/cgu_invalidated_when_export_added.rs b/tests/incremental/thinlto/cgu_invalidated_when_export_added.rs index 2da44eea8929..466096b81ffa 100644 --- a/tests/incremental/thinlto/cgu_invalidated_when_export_added.rs +++ b/tests/incremental/thinlto/cgu_invalidated_when_export_added.rs @@ -1,5 +1,4 @@ -//@ revisions: bfail1 bfail2 -//@ build-pass +//@ revisions: bpass1 bpass2 //@ ignore-backends: gcc // rust-lang/rust#69798: @@ -18,7 +17,7 @@ fn drop(&mut self) { pub extern "C" fn run() { thread_local! { pub static FOO : Foo = Foo { } ; } - #[cfg(bfail2)] + #[cfg(bpass2)] { FOO.with(|_f| ()) } diff --git a/tests/incremental/thinlto/cgu_invalidated_when_export_removed.rs b/tests/incremental/thinlto/cgu_invalidated_when_export_removed.rs index afe485aa0425..6c5d94515eff 100644 --- a/tests/incremental/thinlto/cgu_invalidated_when_export_removed.rs +++ b/tests/incremental/thinlto/cgu_invalidated_when_export_removed.rs @@ -1,5 +1,4 @@ -//@ revisions: bfail1 bfail2 -//@ build-pass +//@ revisions: bpass1 bpass2 //@ ignore-backends: gcc // rust-lang/rust#69798: @@ -18,7 +17,7 @@ fn drop(&mut self) { pub extern "C" fn run() { thread_local! { pub static FOO : Foo = Foo { } ; } - #[cfg(bfail1)] + #[cfg(bpass1)] { FOO.with(|_f| ()) } diff --git a/tests/incremental/thinlto/cgu_invalidated_when_import_added.rs b/tests/incremental/thinlto/cgu_invalidated_when_import_added.rs index 97a63c6765ff..9d6fe9c21253 100644 --- a/tests/incremental/thinlto/cgu_invalidated_when_import_added.rs +++ b/tests/incremental/thinlto/cgu_invalidated_when_import_added.rs @@ -1,6 +1,5 @@ -//@ revisions: bfail1 bfail2 +//@ revisions: bpass1 bpass2 //@ compile-flags: -O -Zhuman-readable-cgu-names -Cllvm-args=-import-instr-limit=10 -//@ build-pass //@ ignore-backends: gcc // rust-lang/rust#59535: @@ -28,16 +27,16 @@ fn main() { mod foo { - // In bfail1, ThinLTO decides that foo() does not get inlined into main, and + // In bpass1, ThinLTO decides that foo() does not get inlined into main, and // instead bar() gets inlined into foo(). - // In bfail2, foo() gets inlined into main. + // In bpass2, foo() gets inlined into main. pub fn foo(){ bar() } // This function needs to be big so that it does not get inlined by ThinLTO // but *does* get inlined into foo() when it is declared `internal` in - // bfail1 (alone). + // bpass1 (alone). pub fn bar(){ println!("quux1"); println!("quux2"); @@ -55,7 +54,7 @@ mod bar { #[inline(never)] pub fn baz() { - #[cfg(bfail2)] + #[cfg(bpass2)] { crate::foo::bar(); } diff --git a/tests/incremental/thinlto/cgu_invalidated_when_import_removed.rs b/tests/incremental/thinlto/cgu_invalidated_when_import_removed.rs index c4943061fbe8..41745827fb8d 100644 --- a/tests/incremental/thinlto/cgu_invalidated_when_import_removed.rs +++ b/tests/incremental/thinlto/cgu_invalidated_when_import_removed.rs @@ -1,6 +1,5 @@ -//@ revisions: bfail1 bfail2 +//@ revisions: bpass1 bpass2 //@ compile-flags: -O -Zhuman-readable-cgu-names -Cllvm-args=-import-instr-limit=10 -//@ build-pass //@ ignore-backends: gcc // rust-lang/rust#59535: @@ -38,8 +37,8 @@ fn main() { mod foo { - // In bfail1, foo() gets inlined into main. - // In bfail2, ThinLTO decides that foo() does not get inlined into main, and + // In bpass1, foo() gets inlined into main. + // In bpass2, ThinLTO decides that foo() does not get inlined into main, and // instead bar() gets inlined into foo(). But faulty logic in our incr. // ThinLTO implementation thought that `main()` is unchanged and thus reused // the object file still containing a call to the now non-existent bar(). @@ -49,7 +48,7 @@ pub fn foo(){ // This function needs to be big so that it does not get inlined by ThinLTO // but *does* get inlined into foo() once it is declared `internal` in - // bfail2. + // bpass2. pub fn bar(){ println!("quux1"); println!("quux2"); @@ -67,7 +66,7 @@ mod bar { #[inline(never)] pub fn baz() { - #[cfg(bfail1)] + #[cfg(bpass1)] { crate::foo::bar(); } diff --git a/tests/incremental/thinlto/cgu_keeps_identical_fn.rs b/tests/incremental/thinlto/cgu_keeps_identical_fn.rs index 9ad2c51efa8e..432fffabf546 100644 --- a/tests/incremental/thinlto/cgu_keeps_identical_fn.rs +++ b/tests/incremental/thinlto/cgu_keeps_identical_fn.rs @@ -3,43 +3,42 @@ // ends up with any spans in its LLVM bitecode, so LLVM is able to skip // re-building any modules which import 'inlined_fn' -//@ revisions: bfail1 bfail2 bfail3 +//@ revisions: bpass1 bpass2 bpass3 //@ compile-flags: -Z query-dep-graph -O -//@ build-pass //@ ignore-backends: gcc #![feature(rustc_attrs)] #![crate_type = "rlib"] #![rustc_expected_cgu_reuse( module = "cgu_keeps_identical_fn-foo", - cfg = "bfail2", + cfg = "bpass2", kind = "pre-lto" )] #![rustc_expected_cgu_reuse( module = "cgu_keeps_identical_fn-foo", - cfg = "bfail3", + cfg = "bpass3", kind = "pre-lto" // Should be "post-lto", see issue #119076 )] #![rustc_expected_cgu_reuse( module = "cgu_keeps_identical_fn-bar", - cfg = "bfail2", + cfg = "bpass2", kind = "pre-lto" // Should be "post-lto", see issue #119076 )] #![rustc_expected_cgu_reuse( module = "cgu_keeps_identical_fn-bar", - cfg = "bfail3", + cfg = "bpass3", kind = "pre-lto" // Should be "post-lto", see issue #119076 )] mod foo { // Trivial functions like this one are imported very reliably by ThinLTO. - #[cfg(bfail1)] + #[cfg(bpass1)] pub fn inlined_fn() -> u32 { 1234 } - #[cfg(not(bfail1))] + #[cfg(not(bpass1))] pub fn inlined_fn() -> u32 { 1234 } diff --git a/tests/incremental/thinlto/independent_cgus_dont_affect_each_other.rs b/tests/incremental/thinlto/independent_cgus_dont_affect_each_other.rs index 3f2ddb49f4de..637d55b089af 100644 --- a/tests/incremental/thinlto/independent_cgus_dont_affect_each_other.rs +++ b/tests/incremental/thinlto/independent_cgus_dont_affect_each_other.rs @@ -1,42 +1,41 @@ // This test checks that a change in a CGU does not invalidate an unrelated CGU // during incremental ThinLTO. -//@ revisions: bfail1 bfail2 bfail3 +//@ revisions: bpass1 bpass2 bpass3 //@ compile-flags: -Z query-dep-graph -O -//@ build-pass //@ ignore-backends: gcc #![feature(rustc_attrs)] #![crate_type="rlib"] #![rustc_expected_cgu_reuse(module="independent_cgus_dont_affect_each_other-foo", - cfg="bfail2", + cfg="bpass2", kind="no")] #![rustc_expected_cgu_reuse(module="independent_cgus_dont_affect_each_other-foo", - cfg="bfail3", + cfg="bpass3", kind="pre-lto")] // Should be "post-lto", see issue #119076 #![rustc_expected_cgu_reuse(module="independent_cgus_dont_affect_each_other-bar", - cfg="bfail2", + cfg="bpass2", kind="pre-lto")] #![rustc_expected_cgu_reuse(module="independent_cgus_dont_affect_each_other-bar", - cfg="bfail3", + cfg="bpass3", kind="pre-lto")] // Should be "post-lto", see issue #119076 #![rustc_expected_cgu_reuse(module="independent_cgus_dont_affect_each_other-baz", - cfg="bfail2", + cfg="bpass2", kind="pre-lto")] // Should be "post-lto", see issue #119076 #![rustc_expected_cgu_reuse(module="independent_cgus_dont_affect_each_other-baz", - cfg="bfail3", + cfg="bpass3", kind="pre-lto")] // Should be "post-lto", see issue #119076 mod foo { - #[cfg(bfail1)] + #[cfg(bpass1)] pub fn inlined_fn() -> u32 { 1234 } - #[cfg(not(bfail1))] + #[cfg(not(bpass1))] pub fn inlined_fn() -> u32 { // See `cgu_keeps_identical_fn.rs` for why this is different // from the other version of this function. diff --git a/tests/incremental/unrecoverable_query.rs b/tests/incremental/unrecoverable_query.rs index 62ee415fde15..2bde47358101 100644 --- a/tests/incremental/unrecoverable_query.rs +++ b/tests/incremental/unrecoverable_query.rs @@ -4,9 +4,8 @@ // In this test prior to fixing compiler was having problems figuring out // drop impl for T inside of m -//@ revisions: bfail1 bfail2 +//@ revisions: bpass1 bpass2 //@ compile-flags: --crate-type=lib -//@ build-pass //@ ignore-backends: gcc #![allow(dead_code)] @@ -32,9 +31,9 @@ pub fn i() -> Self { } enum C { - #[cfg(bfail1)] + #[cfg(bpass1)] Up(()), - #[cfg(bfail2)] + #[cfg(bpass2)] Lorry(()), } diff --git a/tests/incremental/warnings-reemitted.rs b/tests/incremental/warnings-reemitted.rs index be60c2ba3ba5..f97fae58e9be 100644 --- a/tests/incremental/warnings-reemitted.rs +++ b/tests/incremental/warnings-reemitted.rs @@ -1,6 +1,5 @@ -//@ revisions: bfail1 bfail2 bfail3 +//@ revisions: bpass1 bpass2 bpass3 //@ compile-flags: -Coverflow-checks=on -//@ build-pass //@ ignore-backends: gcc #![warn(arithmetic_overflow)]