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); }