From 77aee18c13a919e96b3064f38d54e87a9e892cc0 Mon Sep 17 00:00:00 2001 From: Jeff Crocker Date: Tue, 5 Dec 2017 14:03:24 -0800 Subject: [PATCH 1/8] Update closure expression fingerprint hash tests --- .../incremental/hashes/closure_expressions.rs | 60 ++++++++----------- 1 file changed, 24 insertions(+), 36 deletions(-) diff --git a/src/test/incremental/hashes/closure_expressions.rs b/src/test/incremental/hashes/closure_expressions.rs index 4abc77e0ab6..6cea9a0cb14 100644 --- a/src/test/incremental/hashes/closure_expressions.rs +++ b/src/test/incremental/hashes/closure_expressions.rs @@ -27,16 +27,14 @@ // Change closure body --------------------------------------------------------- #[cfg(cfail1)] -fn change_closure_body() { +pub fn change_closure_body() { let _ = || 1u32; } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn change_closure_body() { +#[rustc_clean(cfg="cfail2", except="HirBody")] +#[rustc_clean(cfg="cfail3")] +pub fn change_closure_body() { let _ = || 3u32; } @@ -44,17 +42,15 @@ fn change_closure_body() { // Add parameter --------------------------------------------------------------- #[cfg(cfail1)] -fn add_parameter() { +pub fn add_parameter() { let x = 0u32; let _ = || x + 1; } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn add_parameter() { +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized, TypeckTables")] +#[rustc_clean(cfg="cfail3")] +pub fn add_parameter() { let x = 0u32; let _ = |x: u32| x + 1; } @@ -63,16 +59,14 @@ fn add_parameter() { // Change parameter pattern ---------------------------------------------------- #[cfg(cfail1)] -fn change_parameter_pattern() { +pub fn change_parameter_pattern() { let _ = |x: &u32| x; } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn change_parameter_pattern() { +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized, TypeckTables")] +#[rustc_clean(cfg="cfail3")] +pub fn change_parameter_pattern() { let _ = |&x: &u32| x; } @@ -80,16 +74,14 @@ fn change_parameter_pattern() { // Add `move` to closure ------------------------------------------------------- #[cfg(cfail1)] -fn add_move() { +pub fn add_move() { let _ = || 1; } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn add_move() { +#[rustc_clean(cfg="cfail2", except="HirBody")] +#[rustc_clean(cfg="cfail3")] +pub fn add_move() { let _ = move || 1; } @@ -97,17 +89,15 @@ fn add_move() { // Add type ascription to parameter -------------------------------------------- #[cfg(cfail1)] -fn add_type_ascription_to_parameter() { +pub fn add_type_ascription_to_parameter() { let closure = |x| x + 1u32; let _: u32 = closure(1); } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn add_type_ascription_to_parameter() { +#[rustc_clean(cfg="cfail2", except="HirBody")] +#[rustc_clean(cfg="cfail3")] +pub fn add_type_ascription_to_parameter() { let closure = |x: u32| x + 1u32; let _: u32 = closure(1); } @@ -116,17 +106,15 @@ fn add_type_ascription_to_parameter() { // Change parameter type ------------------------------------------------------- #[cfg(cfail1)] -fn change_parameter_type() { +pub fn change_parameter_type() { let closure = |x: u32| (x as u64) + 1; let _ = closure(1); } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn change_parameter_type() { +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized, TypeckTables")] +#[rustc_clean(cfg="cfail3")] +pub fn change_parameter_type() { let closure = |x: u16| (x as u64) + 1; let _ = closure(1); } From bf3246fa10532dbed304a30000749f35a4f7c81e Mon Sep 17 00:00:00 2001 From: Jeff Crocker Date: Tue, 5 Dec 2017 14:13:58 -0800 Subject: [PATCH 2/8] Update for loop fingerprint hash tests --- src/test/incremental/hashes/for_loops.rs | 110 +++++++++-------------- 1 file changed, 44 insertions(+), 66 deletions(-) diff --git a/src/test/incremental/hashes/for_loops.rs b/src/test/incremental/hashes/for_loops.rs index 763b0cd05d4..a9b9602c3b1 100644 --- a/src/test/incremental/hashes/for_loops.rs +++ b/src/test/incremental/hashes/for_loops.rs @@ -27,7 +27,7 @@ // Change loop body ------------------------------------------------------------ #[cfg(cfail1)] -fn change_loop_body() { +pub fn change_loop_body() { let mut _x = 0; for _ in 0..1 { _x = 1; @@ -36,11 +36,9 @@ fn change_loop_body() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn change_loop_body() { +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")] +#[rustc_clean(cfg="cfail3")] +pub fn change_loop_body() { let mut _x = 0; for _ in 0..1 { _x = 2; @@ -52,7 +50,7 @@ fn change_loop_body() { // Change iteration variable name ---------------------------------------------- #[cfg(cfail1)] -fn change_iteration_variable_name() { +pub fn change_iteration_variable_name() { let mut _x = 0; for _i in 0..1 { _x = 1; @@ -61,11 +59,9 @@ fn change_iteration_variable_name() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn change_iteration_variable_name() { +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")] +#[rustc_clean(cfg="cfail3")] +pub fn change_iteration_variable_name() { let mut _x = 0; for _a in 0..1 { _x = 1; @@ -77,7 +73,7 @@ fn change_iteration_variable_name() { // Change iteration variable pattern ------------------------------------------- #[cfg(cfail1)] -fn change_iteration_variable_pattern() { +pub fn change_iteration_variable_pattern() { let mut _x = 0; for _i in &[0, 1, 2] { _x = 1; @@ -86,11 +82,9 @@ fn change_iteration_variable_pattern() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn change_iteration_variable_pattern() { +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized, TypeckTables")] +#[rustc_clean(cfg="cfail3")] +pub fn change_iteration_variable_pattern() { let mut _x = 0; for &_i in &[0, 1, 2] { _x = 1; @@ -102,7 +96,7 @@ fn change_iteration_variable_pattern() { // Change iterable ------------------------------------------------------------- #[cfg(cfail1)] -fn change_iterable() { +pub fn change_iterable() { let mut _x = 0; for _ in &[0, 1, 2] { _x = 1; @@ -111,11 +105,9 @@ fn change_iterable() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn change_iterable() { +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")] +#[rustc_clean(cfg="cfail3")] +pub fn change_iterable() { let mut _x = 0; for _ in &[0, 1, 3] { _x = 1; @@ -127,7 +119,7 @@ fn change_iterable() { // Add break ------------------------------------------------------------------- #[cfg(cfail1)] -fn add_break() { +pub fn add_break() { let mut _x = 0; for _ in 0..1 { _x = 1; @@ -135,11 +127,9 @@ fn add_break() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn add_break() { +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized, TypeckTables")] +#[rustc_clean(cfg="cfail3")] +pub fn add_break() { let mut _x = 0; for _ in 0..1 { _x = 1; @@ -151,7 +141,7 @@ fn add_break() { // Add loop label -------------------------------------------------------------- #[cfg(cfail1)] -fn add_loop_label() { +pub fn add_loop_label() { let mut _x = 0; for _ in 0..1 { _x = 1; @@ -160,11 +150,9 @@ fn add_loop_label() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn add_loop_label() { +#[rustc_clean(cfg="cfail2", except="HirBody")] +#[rustc_clean(cfg="cfail3")] +pub fn add_loop_label() { let mut _x = 0; 'label: for _ in 0..1 { _x = 1; @@ -176,7 +164,7 @@ fn add_loop_label() { // Add loop label to break ----------------------------------------------------- #[cfg(cfail1)] -fn add_loop_label_to_break() { +pub fn add_loop_label_to_break() { let mut _x = 0; 'label: for _ in 0..1 { _x = 1; @@ -185,11 +173,9 @@ fn add_loop_label_to_break() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn add_loop_label_to_break() { +#[rustc_clean(cfg="cfail2", except="HirBody")] +#[rustc_clean(cfg="cfail3")] +pub fn add_loop_label_to_break() { let mut _x = 0; 'label: for _ in 0..1 { _x = 1; @@ -201,7 +187,7 @@ fn add_loop_label_to_break() { // Change break label ---------------------------------------------------------- #[cfg(cfail1)] -fn change_break_label() { +pub fn change_break_label() { let mut _x = 0; 'outer: for _ in 0..1 { 'inner: for _ in 0..1 { @@ -212,11 +198,9 @@ fn change_break_label() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn change_break_label() { +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")] +#[rustc_clean(cfg="cfail3")] +pub fn change_break_label() { let mut _x = 0; 'outer: for _ in 0..1 { 'inner: for _ in 0..1 { @@ -230,7 +214,7 @@ fn change_break_label() { // Add loop label to continue -------------------------------------------------- #[cfg(cfail1)] -fn add_loop_label_to_continue() { +pub fn add_loop_label_to_continue() { let mut _x = 0; 'label: for _ in 0..1 { _x = 1; @@ -239,11 +223,9 @@ fn add_loop_label_to_continue() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn add_loop_label_to_continue() { +#[rustc_clean(cfg="cfail2", except="HirBody")] +#[rustc_clean(cfg="cfail3")] +pub fn add_loop_label_to_continue() { let mut _x = 0; 'label: for _ in 0..1 { _x = 1; @@ -255,7 +237,7 @@ fn add_loop_label_to_continue() { // Change continue label ---------------------------------------------------------- #[cfg(cfail1)] -fn change_continue_label() { +pub fn change_continue_label() { let mut _x = 0; 'outer: for _ in 0..1 { 'inner: for _ in 0..1 { @@ -266,11 +248,9 @@ fn change_continue_label() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn change_continue_label() { +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")] +#[rustc_clean(cfg="cfail3")] +pub fn change_continue_label() { let mut _x = 0; 'outer: for _ in 0..1 { 'inner: for _ in 0..1 { @@ -284,7 +264,7 @@ fn change_continue_label() { // Change continue to break ---------------------------------------------------- #[cfg(cfail1)] -fn change_continue_to_break() { +pub fn change_continue_to_break() { let mut _x = 0; for _ in 0..1 { _x = 1; @@ -293,11 +273,9 @@ fn change_continue_to_break() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn change_continue_to_break() { +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")] +#[rustc_clean(cfg="cfail3")] +pub fn change_continue_to_break() { let mut _x = 0; for _ in 0..1 { _x = 1; From bc1754216d880b22b054f4e4dbedb839caed423e Mon Sep 17 00:00:00 2001 From: Jeff Crocker Date: Tue, 5 Dec 2017 14:40:13 -0800 Subject: [PATCH 3/8] Update function interface fingerprint hash tests --- .../incremental/hashes/function_interfaces.rs | 216 +++++++++--------- 1 file changed, 108 insertions(+), 108 deletions(-) diff --git a/src/test/incremental/hashes/function_interfaces.rs b/src/test/incremental/hashes/function_interfaces.rs index b3eb566367c..896144db053 100644 --- a/src/test/incremental/hashes/function_interfaces.rs +++ b/src/test/incremental/hashes/function_interfaces.rs @@ -32,239 +32,239 @@ // Add Parameter --------------------------------------------------------------- #[cfg(cfail1)] -fn add_parameter() {} +pub fn add_parameter() {} #[cfg(not(cfail1))] -#[rustc_dirty(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -fn add_parameter(p: i32) {} +#[rustc_clean(cfg="cfail2", except="Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")] +#[rustc_clean(cfg="cfail3")] +pub fn add_parameter(p: i32) {} // Add Return Type ------------------------------------------------------------- #[cfg(cfail1)] -fn add_return_type() {} +pub fn add_return_type() {} #[cfg(not(cfail1))] -#[rustc_dirty(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -fn add_return_type() -> () {} +#[rustc_clean(cfg="cfail2", except="Hir, HirBody")] +#[rustc_clean(cfg="cfail3")] +pub fn add_return_type() -> () {} // Change Parameter Type ------------------------------------------------------- #[cfg(cfail1)] -fn type_of_parameter(p: i32) {} +pub fn type_of_parameter(p: i32) {} #[cfg(not(cfail1))] -#[rustc_dirty(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -fn type_of_parameter(p: i64) {} +#[rustc_clean(cfg="cfail2", except="Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")] +#[rustc_clean(cfg="cfail3")] +pub fn type_of_parameter(p: i64) {} // Change Parameter Type Reference --------------------------------------------- #[cfg(cfail1)] -fn type_of_parameter_ref(p: &i32) {} +pub fn type_of_parameter_ref(p: &i32) {} #[cfg(not(cfail1))] -#[rustc_dirty(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -fn type_of_parameter_ref(p: &mut i32) {} +#[rustc_clean(cfg="cfail2", except="Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")] +#[rustc_clean(cfg="cfail3")] +pub fn type_of_parameter_ref(p: &mut i32) {} // Change Parameter Order ------------------------------------------------------ #[cfg(cfail1)] -fn order_of_parameters(p1: i32, p2: i64) {} +pub fn order_of_parameters(p1: i32, p2: i64) {} #[cfg(not(cfail1))] -#[rustc_dirty(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -fn order_of_parameters(p2: i64, p1: i32) {} +#[rustc_clean(cfg="cfail2", except="Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")] +#[rustc_clean(cfg="cfail3")] +pub fn order_of_parameters(p2: i64, p1: i32) {} // Unsafe ---------------------------------------------------------------------- #[cfg(cfail1)] -fn make_unsafe() {} +pub fn make_unsafe() {} #[cfg(not(cfail1))] -#[rustc_dirty(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -unsafe fn make_unsafe() {} +#[rustc_clean(cfg="cfail2", except="Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")] +#[rustc_clean(cfg="cfail3")] +pub unsafe fn make_unsafe() {} // Extern ---------------------------------------------------------------------- #[cfg(cfail1)] -fn make_extern() {} +pub fn make_extern() {} #[cfg(not(cfail1))] -#[rustc_dirty(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -extern fn make_extern() {} +#[rustc_clean(cfg="cfail2", except="Hir, HirBody, TypeckTables, FnSignature")] +#[rustc_clean(cfg="cfail3")] +pub extern fn make_extern() {} // Extern C Extern Rust-Intrinsic ---------------------------------------------- #[cfg(cfail1)] -extern "C" fn make_intrinsic() {} +pub extern "C" fn make_intrinsic() {} #[cfg(not(cfail1))] -#[rustc_dirty(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -extern "rust-intrinsic" fn make_intrinsic() {} +#[rustc_clean(cfg="cfail2", except="Hir, HirBody, TypeckTables, FnSignature")] +#[rustc_clean(cfg="cfail3")] +pub extern "rust-intrinsic" fn make_intrinsic() {} // Type Parameter -------------------------------------------------------------- #[cfg(cfail1)] -fn type_parameter() {} +pub fn type_parameter() {} #[cfg(not(cfail1))] -#[rustc_dirty(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -fn type_parameter() {} +#[rustc_clean(cfg="cfail2", except="Hir, HirBody, GenericsOfItem, TypeOfItem, PredicatesOfItem")] +#[rustc_clean(cfg="cfail3")] +pub fn type_parameter() {} // Lifetime Parameter ---------------------------------------------------------- #[cfg(cfail1)] -fn lifetime_parameter() {} +pub fn lifetime_parameter() {} #[cfg(not(cfail1))] -#[rustc_dirty(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -fn lifetime_parameter<'a>() {} +#[rustc_clean(cfg="cfail2", except="Hir, HirBody, GenericsOfItem")] +#[rustc_clean(cfg="cfail3")] +pub fn lifetime_parameter<'a>() {} // Trait Bound ----------------------------------------------------------------- #[cfg(cfail1)] -fn trait_bound() {} +pub fn trait_bound() {} #[cfg(not(cfail1))] -#[rustc_dirty(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -fn trait_bound() {} +#[rustc_clean(cfg="cfail2", except="Hir, HirBody, PredicatesOfItem")] +#[rustc_clean(cfg="cfail3")] +pub fn trait_bound() {} // Builtin Bound --------------------------------------------------------------- #[cfg(cfail1)] -fn builtin_bound() {} +pub fn builtin_bound() {} #[cfg(not(cfail1))] -#[rustc_dirty(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -fn builtin_bound() {} +#[rustc_clean(cfg="cfail2", except="Hir, HirBody, PredicatesOfItem")] +#[rustc_clean(cfg="cfail3")] +pub fn builtin_bound() {} // Lifetime Bound -------------------------------------------------------------- #[cfg(cfail1)] -fn lifetime_bound<'a, T>() {} +pub fn lifetime_bound<'a, T>() {} #[cfg(not(cfail1))] -#[rustc_dirty(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -fn lifetime_bound<'a, T: 'a>() {} +#[rustc_clean(cfg="cfail2", except="Hir, HirBody, GenericsOfItem, TypeOfItem, PredicatesOfItem")] +#[rustc_clean(cfg="cfail3")] +pub fn lifetime_bound<'a, T: 'a>() {} // Second Trait Bound ---------------------------------------------------------- #[cfg(cfail1)] -fn second_trait_bound() {} +pub fn second_trait_bound() {} #[cfg(not(cfail1))] -#[rustc_dirty(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -fn second_trait_bound() {} +#[rustc_clean(cfg="cfail2", except="Hir, HirBody, PredicatesOfItem")] +#[rustc_clean(cfg="cfail3")] +pub fn second_trait_bound() {} // Second Builtin Bound -------------------------------------------------------- #[cfg(cfail1)] -fn second_builtin_bound() {} +pub fn second_builtin_bound() {} #[cfg(not(cfail1))] -#[rustc_dirty(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -fn second_builtin_bound() {} +#[rustc_clean(cfg="cfail2", except="Hir, HirBody, PredicatesOfItem")] +#[rustc_clean(cfg="cfail3")] +pub fn second_builtin_bound() {} // Second Lifetime Bound ------------------------------------------------------- #[cfg(cfail1)] -fn second_lifetime_bound<'a, 'b, T: 'a>() {} +pub fn second_lifetime_bound<'a, 'b, T: 'a>() {} #[cfg(not(cfail1))] -#[rustc_dirty(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -fn second_lifetime_bound<'a, 'b, T: 'a + 'b>() {} +#[rustc_clean(cfg="cfail2", except="Hir, HirBody, GenericsOfItem, TypeOfItem, PredicatesOfItem")] +#[rustc_clean(cfg="cfail3")] +pub fn second_lifetime_bound<'a, 'b, T: 'a + 'b>() {} // Inline ---------------------------------------------------------------------- #[cfg(cfail1)] -fn inline() {} +pub fn inline() {} #[cfg(not(cfail1))] -#[rustc_dirty(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] +#[rustc_clean(cfg="cfail2", except="Hir, HirBody")] +#[rustc_clean(cfg="cfail3")] #[inline] -fn inline() {} +pub fn inline() {} // Inline Never ---------------------------------------------------------------- #[cfg(cfail1)] #[inline(always)] -fn inline_never() {} +pub fn inline_never() {} #[cfg(not(cfail1))] -#[rustc_dirty(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] +#[rustc_clean(cfg="cfail2", except="Hir, HirBody")] +#[rustc_clean(cfg="cfail3")] #[inline(never)] -fn inline_never() {} +pub fn inline_never() {} // No Mangle ------------------------------------------------------------------- #[cfg(cfail1)] -fn no_mangle() {} +pub fn no_mangle() {} #[cfg(not(cfail1))] -#[rustc_dirty(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] +#[rustc_clean(cfg="cfail2", except="Hir, HirBody")] +#[rustc_clean(cfg="cfail3")] #[no_mangle] -fn no_mangle() {} +pub fn no_mangle() {} // Linkage --------------------------------------------------------------------- #[cfg(cfail1)] -fn linkage() {} +pub fn linkage() {} #[cfg(not(cfail1))] -#[rustc_dirty(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] +#[rustc_clean(cfg="cfail2", except="Hir, HirBody")] +#[rustc_clean(cfg="cfail3")] #[linkage="weak_odr"] -fn linkage() {} +pub fn linkage() {} // Return Impl Trait ----------------------------------------------------------- #[cfg(cfail1)] -fn return_impl_trait() -> i32 { +pub fn return_impl_trait() -> i32 { 0 } #[cfg(not(cfail1))] -#[rustc_dirty(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -fn return_impl_trait() -> impl Clone { +#[rustc_clean(cfg="cfail2", except="Hir, HirBody, TypeckTables, FnSignature")] +#[rustc_clean(cfg="cfail3")] +pub fn return_impl_trait() -> impl Clone { 0 } @@ -272,32 +272,32 @@ fn return_impl_trait() -> impl Clone { // Change Return Impl Trait ---------------------------------------------------- #[cfg(cfail1)] -fn change_return_impl_trait() -> impl Clone { +pub fn change_return_impl_trait() -> impl Clone { 0u32 } #[cfg(not(cfail1))] -#[rustc_dirty(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -fn change_return_impl_trait() -> impl Copy { +#[rustc_clean(cfg="cfail2", except="Hir, HirBody")] +#[rustc_clean(cfg="cfail3")] +pub fn change_return_impl_trait() -> impl Copy { 0u32 } // Change Return Type Indirectly ----------------------------------------------- -struct ReferencedType1; -struct ReferencedType2; +pub struct ReferencedType1; +pub struct ReferencedType2; -mod change_return_type_indirectly { +pub mod change_return_type_indirectly { #[cfg(cfail1)] use super::ReferencedType1 as ReturnType; #[cfg(not(cfail1))] use super::ReferencedType2 as ReturnType; - #[rustc_dirty(label="Hir", cfg="cfail2")] - #[rustc_clean(label="Hir", cfg="cfail3")] - fn indirect_return_type() -> ReturnType { + #[rustc_clean(cfg="cfail2", except="Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")] + #[rustc_clean(cfg="cfail3")] + pub fn indirect_return_type() -> ReturnType { ReturnType {} } } @@ -305,44 +305,44 @@ mod change_return_type_indirectly { // Change Parameter Type Indirectly -------------------------------------------- -mod change_parameter_type_indirectly { +pub mod change_parameter_type_indirectly { #[cfg(cfail1)] use super::ReferencedType1 as ParameterType; #[cfg(not(cfail1))] use super::ReferencedType2 as ParameterType; - #[rustc_dirty(label="Hir", cfg="cfail2")] - #[rustc_clean(label="Hir", cfg="cfail3")] - fn indirect_parameter_type(p: ParameterType) {} + #[rustc_clean(cfg="cfail2", except="Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")] + #[rustc_clean(cfg="cfail3")] + pub fn indirect_parameter_type(p: ParameterType) {} } // Change Trait Bound Indirectly ----------------------------------------------- -trait ReferencedTrait1 {} -trait ReferencedTrait2 {} +pub trait ReferencedTrait1 {} +pub trait ReferencedTrait2 {} -mod change_trait_bound_indirectly { +pub mod change_trait_bound_indirectly { #[cfg(cfail1)] use super::ReferencedTrait1 as Trait; #[cfg(not(cfail1))] use super::ReferencedTrait2 as Trait; - #[rustc_dirty(label="Hir", cfg="cfail2")] - #[rustc_clean(label="Hir", cfg="cfail3")] - fn indirect_trait_bound(p: T) {} + #[rustc_clean(cfg="cfail2", except="Hir, HirBody, PredicatesOfItem")] + #[rustc_clean(cfg="cfail3")] + pub fn indirect_trait_bound(p: T) {} } // Change Trait Bound Indirectly In Where Clause ------------------------------- -mod change_trait_bound_indirectly_in_where_clause { +pub mod change_trait_bound_indirectly_in_where_clause { #[cfg(cfail1)] use super::ReferencedTrait1 as Trait; #[cfg(not(cfail1))] use super::ReferencedTrait2 as Trait; - #[rustc_dirty(label="Hir", cfg="cfail2")] - #[rustc_clean(label="Hir", cfg="cfail3")] - fn indirect_trait_bound_where(p: T) where T: Trait {} + #[rustc_clean(cfg="cfail2", except="Hir, HirBody, PredicatesOfItem")] + #[rustc_clean(cfg="cfail3")] + pub fn indirect_trait_bound_where(p: T) where T: Trait {} } From 820ed30a85868683fc46a28f54fd73da36e27520 Mon Sep 17 00:00:00 2001 From: Jeff Crocker Date: Tue, 5 Dec 2017 14:44:52 -0800 Subject: [PATCH 4/8] Update inline asm fingerprint hash tests --- src/test/incremental/hashes/inline_asm.rs | 60 +++++++++-------------- 1 file changed, 24 insertions(+), 36 deletions(-) diff --git a/src/test/incremental/hashes/inline_asm.rs b/src/test/incremental/hashes/inline_asm.rs index 0947239c573..1d66d4ab9d3 100644 --- a/src/test/incremental/hashes/inline_asm.rs +++ b/src/test/incremental/hashes/inline_asm.rs @@ -30,7 +30,7 @@ // Change template ------------------------------------------------------------- #[cfg(cfail1)] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] -fn change_template(a: i32) -> i32 { +pub fn change_template(a: i32) -> i32 { let c: i32; unsafe { asm!("add 1, $0" @@ -44,12 +44,10 @@ fn change_template(a: i32) -> i32 { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")] +#[rustc_clean(cfg="cfail3")] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] -fn change_template(a: i32) -> i32 { +pub fn change_template(a: i32) -> i32 { let c: i32; unsafe { asm!("add 2, $0" @@ -67,7 +65,7 @@ fn change_template(a: i32) -> i32 { // Change output ------------------------------------------------------------- #[cfg(cfail1)] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] -fn change_output(a: i32) -> i32 { +pub fn change_output(a: i32) -> i32 { let mut _out1: i32 = 0; let mut _out2: i32 = 0; unsafe { @@ -82,12 +80,10 @@ fn change_output(a: i32) -> i32 { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")] +#[rustc_clean(cfg="cfail3")] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] -fn change_output(a: i32) -> i32 { +pub fn change_output(a: i32) -> i32 { let mut _out1: i32 = 0; let mut _out2: i32 = 0; unsafe { @@ -106,7 +102,7 @@ fn change_output(a: i32) -> i32 { // Change input ------------------------------------------------------------- #[cfg(cfail1)] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] -fn change_input(_a: i32, _b: i32) -> i32 { +pub fn change_input(_a: i32, _b: i32) -> i32 { let _out; unsafe { asm!("add 1, $0" @@ -120,12 +116,10 @@ fn change_input(_a: i32, _b: i32) -> i32 { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")] +#[rustc_clean(cfg="cfail3")] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] -fn change_input(_a: i32, _b: i32) -> i32 { +pub fn change_input(_a: i32, _b: i32) -> i32 { let _out; unsafe { asm!("add 1, $0" @@ -143,7 +137,7 @@ fn change_input(_a: i32, _b: i32) -> i32 { // Change input constraint ----------------------------------------------------- #[cfg(cfail1)] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] -fn change_input_constraint(_a: i32, _b: i32) -> i32 { +pub fn change_input_constraint(_a: i32, _b: i32) -> i32 { let _out; unsafe { asm!("add 1, $0" @@ -157,12 +151,10 @@ fn change_input_constraint(_a: i32, _b: i32) -> i32 { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")] +#[rustc_clean(cfg="cfail3")] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] -fn change_input_constraint(_a: i32, _b: i32) -> i32 { +pub fn change_input_constraint(_a: i32, _b: i32) -> i32 { let _out; unsafe { asm!("add 1, $0" @@ -180,7 +172,7 @@ fn change_input_constraint(_a: i32, _b: i32) -> i32 { // Change clobber -------------------------------------------------------------- #[cfg(cfail1)] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] -fn change_clobber(_a: i32) -> i32 { +pub fn change_clobber(_a: i32) -> i32 { let _out; unsafe { asm!("add 1, $0" @@ -194,12 +186,10 @@ fn change_clobber(_a: i32) -> i32 { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")] +#[rustc_clean(cfg="cfail3")] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] -fn change_clobber(_a: i32) -> i32 { +pub fn change_clobber(_a: i32) -> i32 { let _out; unsafe { asm!("add 1, $0" @@ -217,7 +207,7 @@ fn change_clobber(_a: i32) -> i32 { // Change options -------------------------------------------------------------- #[cfg(cfail1)] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] -fn change_options(_a: i32) -> i32 { +pub fn change_options(_a: i32) -> i32 { let _out; unsafe { asm!("add 1, $0" @@ -231,12 +221,10 @@ fn change_options(_a: i32) -> i32 { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")] +#[rustc_clean(cfg="cfail3")] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] -fn change_options(_a: i32) -> i32 { +pub fn change_options(_a: i32) -> i32 { let _out; unsafe { asm!("add 1, $0" From 3f48cbb4557d525556bf31c9b3227a9aef299385 Mon Sep 17 00:00:00 2001 From: Jeff Crocker Date: Tue, 5 Dec 2017 14:50:54 -0800 Subject: [PATCH 5/8] Update loop expression fingerprint hash tests --- .../incremental/hashes/loop_expressions.rs | 80 ++++++++----------- 1 file changed, 32 insertions(+), 48 deletions(-) diff --git a/src/test/incremental/hashes/loop_expressions.rs b/src/test/incremental/hashes/loop_expressions.rs index 8d015288757..243dc9ee519 100644 --- a/src/test/incremental/hashes/loop_expressions.rs +++ b/src/test/incremental/hashes/loop_expressions.rs @@ -27,7 +27,7 @@ // Change loop body ------------------------------------------------------------ #[cfg(cfail1)] -fn change_loop_body() { +pub fn change_loop_body() { let mut _x = 0; loop { _x = 1; @@ -36,11 +36,9 @@ fn change_loop_body() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn change_loop_body() { +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")] +#[rustc_clean(cfg="cfail3")] +pub fn change_loop_body() { let mut _x = 0; loop { _x = 2; @@ -52,7 +50,7 @@ fn change_loop_body() { // Add break ------------------------------------------------------------------- #[cfg(cfail1)] -fn add_break() { +pub fn add_break() { let mut _x = 0; loop { _x = 1; @@ -60,11 +58,9 @@ fn add_break() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn add_break() { +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized, TypeckTables")] +#[rustc_clean(cfg="cfail3")] +pub fn add_break() { let mut _x = 0; loop { _x = 1; @@ -76,7 +72,7 @@ fn add_break() { // Add loop label -------------------------------------------------------------- #[cfg(cfail1)] -fn add_loop_label() { +pub fn add_loop_label() { let mut _x = 0; loop { _x = 1; @@ -85,11 +81,9 @@ fn add_loop_label() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn add_loop_label() { +#[rustc_clean(cfg="cfail2", except="HirBody")] +#[rustc_clean(cfg="cfail3")] +pub fn add_loop_label() { let mut _x = 0; 'label: loop { _x = 1; @@ -101,7 +95,7 @@ fn add_loop_label() { // Add loop label to break ----------------------------------------------------- #[cfg(cfail1)] -fn add_loop_label_to_break() { +pub fn add_loop_label_to_break() { let mut _x = 0; 'label: loop { _x = 1; @@ -110,11 +104,9 @@ fn add_loop_label_to_break() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn add_loop_label_to_break() { +#[rustc_clean(cfg="cfail2", except="HirBody")] +#[rustc_clean(cfg="cfail3")] +pub fn add_loop_label_to_break() { let mut _x = 0; 'label: loop { _x = 1; @@ -126,7 +118,7 @@ fn add_loop_label_to_break() { // Change break label ---------------------------------------------------------- #[cfg(cfail1)] -fn change_break_label() { +pub fn change_break_label() { let mut _x = 0; 'outer: loop { 'inner: loop { @@ -137,11 +129,9 @@ fn change_break_label() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn change_break_label() { +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized, TypeckTables")] +#[rustc_clean(cfg="cfail3")] +pub fn change_break_label() { let mut _x = 0; 'outer: loop { 'inner: loop { @@ -155,7 +145,7 @@ fn change_break_label() { // Add loop label to continue -------------------------------------------------- #[cfg(cfail1)] -fn add_loop_label_to_continue() { +pub fn add_loop_label_to_continue() { let mut _x = 0; 'label: loop { _x = 1; @@ -164,11 +154,9 @@ fn add_loop_label_to_continue() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn add_loop_label_to_continue() { +#[rustc_clean(cfg="cfail2", except="HirBody")] +#[rustc_clean(cfg="cfail3")] +pub fn add_loop_label_to_continue() { let mut _x = 0; 'label: loop { _x = 1; @@ -180,7 +168,7 @@ fn add_loop_label_to_continue() { // Change continue label ---------------------------------------------------------- #[cfg(cfail1)] -fn change_continue_label() { +pub fn change_continue_label() { let mut _x = 0; 'outer: loop { 'inner: loop { @@ -191,11 +179,9 @@ fn change_continue_label() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn change_continue_label() { +#[rustc_clean(cfg="cfail2", except="HirBody, TypeckTables")] +#[rustc_clean(cfg="cfail3")] +pub fn change_continue_label() { let mut _x = 0; 'outer: loop { 'inner: loop { @@ -209,7 +195,7 @@ fn change_continue_label() { // Change continue to break ---------------------------------------------------- #[cfg(cfail1)] -fn change_continue_to_break() { +pub fn change_continue_to_break() { let mut _x = 0; loop { _x = 1; @@ -218,11 +204,9 @@ fn change_continue_to_break() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn change_continue_to_break() { +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized, TypeckTables")] +#[rustc_clean(cfg="cfail3")] +pub fn change_continue_to_break() { let mut _x = 0; loop { _x = 1; From b8714c60409c8c498852d54e6f43f087b3935c8f Mon Sep 17 00:00:00 2001 From: Jeff Crocker Date: Tue, 5 Dec 2017 14:57:35 -0800 Subject: [PATCH 6/8] Update 'while let loop' fingerprint hash tests --- .../incremental/hashes/while_let_loops.rs | 90 ++++++++----------- 1 file changed, 36 insertions(+), 54 deletions(-) diff --git a/src/test/incremental/hashes/while_let_loops.rs b/src/test/incremental/hashes/while_let_loops.rs index eae5aea6510..cab38d0adc2 100644 --- a/src/test/incremental/hashes/while_let_loops.rs +++ b/src/test/incremental/hashes/while_let_loops.rs @@ -27,7 +27,7 @@ // Change loop body ------------------------------------------------------------ #[cfg(cfail1)] -fn change_loop_body() { +pub fn change_loop_body() { let mut _x = 0; while let Some(0u32) = None { _x = 1; @@ -36,11 +36,9 @@ fn change_loop_body() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn change_loop_body() { +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")] +#[rustc_clean(cfg="cfail3")] +pub fn change_loop_body() { let mut _x = 0; while let Some(0u32) = None { _x = 2; @@ -52,7 +50,7 @@ fn change_loop_body() { // Change loop body ------------------------------------------------------------ #[cfg(cfail1)] -fn change_loop_condition() { +pub fn change_loop_condition() { let mut _x = 0; while let Some(0u32) = None { _x = 1; @@ -61,11 +59,9 @@ fn change_loop_condition() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn change_loop_condition() { +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")] +#[rustc_clean(cfg="cfail3")] +pub fn change_loop_condition() { let mut _x = 0; while let Some(1u32) = None { _x = 1; @@ -77,7 +73,7 @@ fn change_loop_condition() { // Add break ------------------------------------------------------------------- #[cfg(cfail1)] -fn add_break() { +pub fn add_break() { let mut _x = 0; while let Some(0u32) = None { _x = 1; @@ -85,11 +81,9 @@ fn add_break() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn add_break() { +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized, TypeckTables")] +#[rustc_clean(cfg="cfail3")] +pub fn add_break() { let mut _x = 0; while let Some(0u32) = None { _x = 1; @@ -101,7 +95,7 @@ fn add_break() { // Add loop label -------------------------------------------------------------- #[cfg(cfail1)] -fn add_loop_label() { +pub fn add_loop_label() { let mut _x = 0; while let Some(0u32) = None { _x = 1; @@ -110,11 +104,9 @@ fn add_loop_label() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn add_loop_label() { +#[rustc_clean(cfg="cfail2", except="HirBody")] +#[rustc_clean(cfg="cfail3")] +pub fn add_loop_label() { let mut _x = 0; 'label: while let Some(0u32) = None { _x = 1; @@ -126,7 +118,7 @@ fn add_loop_label() { // Add loop label to break ----------------------------------------------------- #[cfg(cfail1)] -fn add_loop_label_to_break() { +pub fn add_loop_label_to_break() { let mut _x = 0; 'label: while let Some(0u32) = None { _x = 1; @@ -135,11 +127,9 @@ fn add_loop_label_to_break() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn add_loop_label_to_break() { +#[rustc_clean(cfg="cfail2", except="HirBody")] +#[rustc_clean(cfg="cfail3")] +pub fn add_loop_label_to_break() { let mut _x = 0; 'label: while let Some(0u32) = None { _x = 1; @@ -151,7 +141,7 @@ fn add_loop_label_to_break() { // Change break label ---------------------------------------------------------- #[cfg(cfail1)] -fn change_break_label() { +pub fn change_break_label() { let mut _x = 0; 'outer: while let Some(0u32) = None { 'inner: while let Some(0u32) = None { @@ -162,11 +152,9 @@ fn change_break_label() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn change_break_label() { +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized, TypeckTables")] +#[rustc_clean(cfg="cfail3")] +pub fn change_break_label() { let mut _x = 0; 'outer: while let Some(0u32) = None { 'inner: while let Some(0u32) = None { @@ -180,7 +168,7 @@ fn change_break_label() { // Add loop label to continue -------------------------------------------------- #[cfg(cfail1)] -fn add_loop_label_to_continue() { +pub fn add_loop_label_to_continue() { let mut _x = 0; 'label: while let Some(0u32) = None { _x = 1; @@ -189,11 +177,9 @@ fn add_loop_label_to_continue() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn add_loop_label_to_continue() { +#[rustc_clean(cfg="cfail2", except="HirBody")] +#[rustc_clean(cfg="cfail3")] +pub fn add_loop_label_to_continue() { let mut _x = 0; 'label: while let Some(0u32) = None { _x = 1; @@ -205,7 +191,7 @@ fn add_loop_label_to_continue() { // Change continue label ---------------------------------------------------------- #[cfg(cfail1)] -fn change_continue_label() { +pub fn change_continue_label() { let mut _x = 0; 'outer: while let Some(0u32) = None { 'inner: while let Some(0u32) = None { @@ -216,11 +202,9 @@ fn change_continue_label() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn change_continue_label() { +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized, TypeckTables")] +#[rustc_clean(cfg="cfail3")] +pub fn change_continue_label() { let mut _x = 0; 'outer: while let Some(0u32) = None { 'inner: while let Some(0u32) = None { @@ -234,7 +218,7 @@ fn change_continue_label() { // Change continue to break ---------------------------------------------------- #[cfg(cfail1)] -fn change_continue_to_break() { +pub fn change_continue_to_break() { let mut _x = 0; while let Some(0u32) = None { _x = 1; @@ -243,11 +227,9 @@ fn change_continue_to_break() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn change_continue_to_break() { +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")] +#[rustc_clean(cfg="cfail3")] +pub fn change_continue_to_break() { let mut _x = 0; while let Some(0u32) = None { _x = 1; From 104ebd2c43ce69d346a6031809c6bfe621eed5eb Mon Sep 17 00:00:00 2001 From: Jeff Crocker Date: Tue, 5 Dec 2017 15:01:49 -0800 Subject: [PATCH 7/8] Update 'while loop' fingerprint hash tests --- src/test/incremental/hashes/while_loops.rs | 90 +++++++++------------- 1 file changed, 36 insertions(+), 54 deletions(-) diff --git a/src/test/incremental/hashes/while_loops.rs b/src/test/incremental/hashes/while_loops.rs index 6b1898e401b..30989f33b4b 100644 --- a/src/test/incremental/hashes/while_loops.rs +++ b/src/test/incremental/hashes/while_loops.rs @@ -27,7 +27,7 @@ // Change loop body ------------------------------------------------------------ #[cfg(cfail1)] -fn change_loop_body() { +pub fn change_loop_body() { let mut _x = 0; while true { _x = 1; @@ -36,11 +36,9 @@ fn change_loop_body() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn change_loop_body() { +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")] +#[rustc_clean(cfg="cfail3")] +pub fn change_loop_body() { let mut _x = 0; while true { _x = 2; @@ -52,7 +50,7 @@ fn change_loop_body() { // Change loop body ------------------------------------------------------------ #[cfg(cfail1)] -fn change_loop_condition() { +pub fn change_loop_condition() { let mut _x = 0; while true { _x = 1; @@ -61,11 +59,9 @@ fn change_loop_condition() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn change_loop_condition() { +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")] +#[rustc_clean(cfg="cfail3")] +pub fn change_loop_condition() { let mut _x = 0; while false { _x = 1; @@ -77,7 +73,7 @@ fn change_loop_condition() { // Add break ------------------------------------------------------------------- #[cfg(cfail1)] -fn add_break() { +pub fn add_break() { let mut _x = 0; while true { _x = 1; @@ -85,11 +81,9 @@ fn add_break() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn add_break() { +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized, TypeckTables")] +#[rustc_clean(cfg="cfail3")] +pub fn add_break() { let mut _x = 0; while true { _x = 1; @@ -101,7 +95,7 @@ fn add_break() { // Add loop label -------------------------------------------------------------- #[cfg(cfail1)] -fn add_loop_label() { +pub fn add_loop_label() { let mut _x = 0; while true { _x = 1; @@ -110,11 +104,9 @@ fn add_loop_label() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn add_loop_label() { +#[rustc_clean(cfg="cfail2", except="HirBody")] +#[rustc_clean(cfg="cfail3")] +pub fn add_loop_label() { let mut _x = 0; 'label: while true { _x = 1; @@ -126,7 +118,7 @@ fn add_loop_label() { // Add loop label to break ----------------------------------------------------- #[cfg(cfail1)] -fn add_loop_label_to_break() { +pub fn add_loop_label_to_break() { let mut _x = 0; 'label: while true { _x = 1; @@ -135,11 +127,9 @@ fn add_loop_label_to_break() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn add_loop_label_to_break() { +#[rustc_clean(cfg="cfail2", except="HirBody")] +#[rustc_clean(cfg="cfail3")] +pub fn add_loop_label_to_break() { let mut _x = 0; 'label: while true { _x = 1; @@ -151,7 +141,7 @@ fn add_loop_label_to_break() { // Change break label ---------------------------------------------------------- #[cfg(cfail1)] -fn change_break_label() { +pub fn change_break_label() { let mut _x = 0; 'outer: while true { 'inner: while true { @@ -162,11 +152,9 @@ fn change_break_label() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn change_break_label() { +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")] +#[rustc_clean(cfg="cfail3")] +pub fn change_break_label() { let mut _x = 0; 'outer: while true { 'inner: while true { @@ -180,7 +168,7 @@ fn change_break_label() { // Add loop label to continue -------------------------------------------------- #[cfg(cfail1)] -fn add_loop_label_to_continue() { +pub fn add_loop_label_to_continue() { let mut _x = 0; 'label: while true { _x = 1; @@ -189,11 +177,9 @@ fn add_loop_label_to_continue() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn add_loop_label_to_continue() { +#[rustc_clean(cfg="cfail2", except="HirBody")] +#[rustc_clean(cfg="cfail3")] +pub fn add_loop_label_to_continue() { let mut _x = 0; 'label: while true { _x = 1; @@ -205,7 +191,7 @@ fn add_loop_label_to_continue() { // Change continue label ---------------------------------------------------------- #[cfg(cfail1)] -fn change_continue_label() { +pub fn change_continue_label() { let mut _x = 0; 'outer: while true { 'inner: while true { @@ -216,11 +202,9 @@ fn change_continue_label() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn change_continue_label() { +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated")] +#[rustc_clean(cfg="cfail3")] +pub fn change_continue_label() { let mut _x = 0; 'outer: while true { 'inner: while true { @@ -234,7 +218,7 @@ fn change_continue_label() { // Change continue to break ---------------------------------------------------- #[cfg(cfail1)] -fn change_continue_to_break() { +pub fn change_continue_to_break() { let mut _x = 0; while true { _x = 1; @@ -243,11 +227,9 @@ fn change_continue_to_break() { } #[cfg(not(cfail1))] -#[rustc_clean(label="Hir", cfg="cfail2")] -#[rustc_clean(label="Hir", cfg="cfail3")] -#[rustc_dirty(label="HirBody", cfg="cfail2")] -#[rustc_clean(label="HirBody", cfg="cfail3")] -fn change_continue_to_break() { +#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")] +#[rustc_clean(cfg="cfail3")] +pub fn change_continue_to_break() { let mut _x = 0; while true { _x = 1; From 3f0cc7caca2a597c589e4792af2653dcc1d07aa0 Mon Sep 17 00:00:00 2001 From: Jeff Crocker Date: Tue, 5 Dec 2017 15:27:14 -0800 Subject: [PATCH 8/8] Format function interface fingerprint hash tests --- .../incremental/hashes/function_interfaces.rs | 126 ++++++++++-------- 1 file changed, 70 insertions(+), 56 deletions(-) diff --git a/src/test/incremental/hashes/function_interfaces.rs b/src/test/incremental/hashes/function_interfaces.rs index 896144db053..952256a65bd 100644 --- a/src/test/incremental/hashes/function_interfaces.rs +++ b/src/test/incremental/hashes/function_interfaces.rs @@ -26,7 +26,7 @@ #![feature(intrinsics)] #![feature(linkage)] #![feature(rustc_attrs)] -#![crate_type="rlib"] +#![crate_type = "rlib"] // Add Parameter --------------------------------------------------------------- @@ -35,8 +35,9 @@ pub fn add_parameter() {} #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")] -#[rustc_clean(cfg="cfail3")] +#[rustc_clean(cfg = "cfail2", + except = "Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")] +#[rustc_clean(cfg = "cfail3")] pub fn add_parameter(p: i32) {} @@ -46,8 +47,8 @@ pub fn add_parameter(p: i32) {} pub fn add_return_type() {} #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="Hir, HirBody")] -#[rustc_clean(cfg="cfail3")] +#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody")] +#[rustc_clean(cfg = "cfail3")] pub fn add_return_type() -> () {} @@ -57,8 +58,9 @@ pub fn add_return_type() -> () {} pub fn type_of_parameter(p: i32) {} #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")] -#[rustc_clean(cfg="cfail3")] +#[rustc_clean(cfg = "cfail2", + except = "Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")] +#[rustc_clean(cfg = "cfail3")] pub fn type_of_parameter(p: i64) {} @@ -68,8 +70,9 @@ pub fn type_of_parameter(p: i64) {} pub fn type_of_parameter_ref(p: &i32) {} #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")] -#[rustc_clean(cfg="cfail3")] +#[rustc_clean(cfg = "cfail2", + except = "Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")] +#[rustc_clean(cfg = "cfail3")] pub fn type_of_parameter_ref(p: &mut i32) {} @@ -79,8 +82,9 @@ pub fn type_of_parameter_ref(p: &mut i32) {} pub fn order_of_parameters(p1: i32, p2: i64) {} #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")] -#[rustc_clean(cfg="cfail3")] +#[rustc_clean(cfg = "cfail2", + except = "Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")] +#[rustc_clean(cfg = "cfail3")] pub fn order_of_parameters(p2: i64, p1: i32) {} @@ -90,8 +94,9 @@ pub fn order_of_parameters(p2: i64, p1: i32) {} pub fn make_unsafe() {} #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")] -#[rustc_clean(cfg="cfail3")] +#[rustc_clean(cfg = "cfail2", + except = "Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")] +#[rustc_clean(cfg = "cfail3")] pub unsafe fn make_unsafe() {} @@ -101,9 +106,9 @@ pub unsafe fn make_unsafe() {} pub fn make_extern() {} #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="Hir, HirBody, TypeckTables, FnSignature")] -#[rustc_clean(cfg="cfail3")] -pub extern fn make_extern() {} +#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, TypeckTables, FnSignature")] +#[rustc_clean(cfg = "cfail3")] +pub extern "C" fn make_extern() {} // Extern C Extern Rust-Intrinsic ---------------------------------------------- @@ -112,8 +117,8 @@ pub extern fn make_extern() {} pub extern "C" fn make_intrinsic() {} #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="Hir, HirBody, TypeckTables, FnSignature")] -#[rustc_clean(cfg="cfail3")] +#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, TypeckTables, FnSignature")] +#[rustc_clean(cfg = "cfail3")] pub extern "rust-intrinsic" fn make_intrinsic() {} @@ -123,8 +128,9 @@ pub extern "rust-intrinsic" fn make_intrinsic() {} pub fn type_parameter() {} #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="Hir, HirBody, GenericsOfItem, TypeOfItem, PredicatesOfItem")] -#[rustc_clean(cfg="cfail3")] +#[rustc_clean(cfg = "cfail2", + except = "Hir, HirBody, GenericsOfItem, TypeOfItem, PredicatesOfItem")] +#[rustc_clean(cfg = "cfail3")] pub fn type_parameter() {} @@ -134,8 +140,8 @@ pub fn type_parameter() {} pub fn lifetime_parameter() {} #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="Hir, HirBody, GenericsOfItem")] -#[rustc_clean(cfg="cfail3")] +#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, GenericsOfItem")] +#[rustc_clean(cfg = "cfail3")] pub fn lifetime_parameter<'a>() {} @@ -145,8 +151,8 @@ pub fn lifetime_parameter<'a>() {} pub fn trait_bound() {} #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="Hir, HirBody, PredicatesOfItem")] -#[rustc_clean(cfg="cfail3")] +#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, PredicatesOfItem")] +#[rustc_clean(cfg = "cfail3")] pub fn trait_bound() {} @@ -156,8 +162,8 @@ pub fn trait_bound() {} pub fn builtin_bound() {} #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="Hir, HirBody, PredicatesOfItem")] -#[rustc_clean(cfg="cfail3")] +#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, PredicatesOfItem")] +#[rustc_clean(cfg = "cfail3")] pub fn builtin_bound() {} @@ -167,8 +173,9 @@ pub fn builtin_bound() {} pub fn lifetime_bound<'a, T>() {} #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="Hir, HirBody, GenericsOfItem, TypeOfItem, PredicatesOfItem")] -#[rustc_clean(cfg="cfail3")] +#[rustc_clean(cfg = "cfail2", + except = "Hir, HirBody, GenericsOfItem, TypeOfItem, PredicatesOfItem")] +#[rustc_clean(cfg = "cfail3")] pub fn lifetime_bound<'a, T: 'a>() {} @@ -178,8 +185,8 @@ pub fn lifetime_bound<'a, T: 'a>() {} pub fn second_trait_bound() {} #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="Hir, HirBody, PredicatesOfItem")] -#[rustc_clean(cfg="cfail3")] +#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, PredicatesOfItem")] +#[rustc_clean(cfg = "cfail3")] pub fn second_trait_bound() {} @@ -189,8 +196,8 @@ pub fn second_trait_bound() {} pub fn second_builtin_bound() {} #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="Hir, HirBody, PredicatesOfItem")] -#[rustc_clean(cfg="cfail3")] +#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, PredicatesOfItem")] +#[rustc_clean(cfg = "cfail3")] pub fn second_builtin_bound() {} @@ -200,8 +207,9 @@ pub fn second_builtin_bound() {} pub fn second_lifetime_bound<'a, 'b, T: 'a>() {} #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="Hir, HirBody, GenericsOfItem, TypeOfItem, PredicatesOfItem")] -#[rustc_clean(cfg="cfail3")] +#[rustc_clean(cfg = "cfail2", + except = "Hir, HirBody, GenericsOfItem, TypeOfItem, PredicatesOfItem")] +#[rustc_clean(cfg = "cfail3")] pub fn second_lifetime_bound<'a, 'b, T: 'a + 'b>() {} @@ -211,8 +219,8 @@ pub fn second_lifetime_bound<'a, 'b, T: 'a + 'b>() {} pub fn inline() {} #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="Hir, HirBody")] -#[rustc_clean(cfg="cfail3")] +#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody")] +#[rustc_clean(cfg = "cfail3")] #[inline] pub fn inline() {} @@ -224,8 +232,8 @@ pub fn inline() {} pub fn inline_never() {} #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="Hir, HirBody")] -#[rustc_clean(cfg="cfail3")] +#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody")] +#[rustc_clean(cfg = "cfail3")] #[inline(never)] pub fn inline_never() {} @@ -236,8 +244,8 @@ pub fn inline_never() {} pub fn no_mangle() {} #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="Hir, HirBody")] -#[rustc_clean(cfg="cfail3")] +#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody")] +#[rustc_clean(cfg = "cfail3")] #[no_mangle] pub fn no_mangle() {} @@ -248,9 +256,9 @@ pub fn no_mangle() {} pub fn linkage() {} #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="Hir, HirBody")] -#[rustc_clean(cfg="cfail3")] -#[linkage="weak_odr"] +#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody")] +#[rustc_clean(cfg = "cfail3")] +#[linkage = "weak_odr"] pub fn linkage() {} @@ -262,8 +270,8 @@ pub fn return_impl_trait() -> i32 { } #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="Hir, HirBody, TypeckTables, FnSignature")] -#[rustc_clean(cfg="cfail3")] +#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, TypeckTables, FnSignature")] +#[rustc_clean(cfg = "cfail3")] pub fn return_impl_trait() -> impl Clone { 0 } @@ -277,8 +285,8 @@ pub fn change_return_impl_trait() -> impl Clone { } #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="Hir, HirBody")] -#[rustc_clean(cfg="cfail3")] +#[rustc_clean(cfg = "cfail2", except = "Hir, HirBody")] +#[rustc_clean(cfg = "cfail3")] pub fn change_return_impl_trait() -> impl Copy { 0u32 } @@ -295,8 +303,9 @@ pub mod change_return_type_indirectly { #[cfg(not(cfail1))] use super::ReferencedType2 as ReturnType; - #[rustc_clean(cfg="cfail2", except="Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")] - #[rustc_clean(cfg="cfail3")] + #[rustc_clean(cfg = "cfail2", + except = "Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")] + #[rustc_clean(cfg = "cfail3")] pub fn indirect_return_type() -> ReturnType { ReturnType {} } @@ -311,8 +320,9 @@ pub mod change_parameter_type_indirectly { #[cfg(not(cfail1))] use super::ReferencedType2 as ParameterType; - #[rustc_clean(cfg="cfail2", except="Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")] - #[rustc_clean(cfg="cfail3")] + #[rustc_clean(cfg = "cfail2", + except = "Hir, HirBody, MirValidated, MirOptimized, TypeckTables, FnSignature")] + #[rustc_clean(cfg = "cfail3")] pub fn indirect_parameter_type(p: ParameterType) {} } @@ -328,8 +338,8 @@ pub mod change_trait_bound_indirectly { #[cfg(not(cfail1))] use super::ReferencedTrait2 as Trait; - #[rustc_clean(cfg="cfail2", except="Hir, HirBody, PredicatesOfItem")] - #[rustc_clean(cfg="cfail3")] + #[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, PredicatesOfItem")] + #[rustc_clean(cfg = "cfail3")] pub fn indirect_trait_bound(p: T) {} } @@ -342,7 +352,11 @@ pub mod change_trait_bound_indirectly_in_where_clause { #[cfg(not(cfail1))] use super::ReferencedTrait2 as Trait; - #[rustc_clean(cfg="cfail2", except="Hir, HirBody, PredicatesOfItem")] - #[rustc_clean(cfg="cfail3")] - pub fn indirect_trait_bound_where(p: T) where T: Trait {} + #[rustc_clean(cfg = "cfail2", except = "Hir, HirBody, PredicatesOfItem")] + #[rustc_clean(cfg = "cfail3")] + pub fn indirect_trait_bound_where(p: T) + where + T: Trait, + { + } }