Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoxc committed Feb 8, 2019
1 parent 6ec66df commit a0f02cd
Show file tree
Hide file tree
Showing 18 changed files with 155 additions and 155 deletions.
4 changes: 2 additions & 2 deletions src/librustc_incremental/persist/dirty_clean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ const BASE_IMPL: &[&str] = &[
label_strs::ImplTraitRef,
];

/// DepNodes for MirValidated/Optimized, which is relevant in "executable"
/// DepNodes for MirBuilt/Optimized, which is relevant in "executable"
/// code, i.e., functions+methods
const BASE_MIR: &[&str] = &[
label_strs::MirOptimized,
label_strs::MirValidated,
label_strs::MirBuilt,
];

/// Struct, Enum and Union DepNodes
Expand Down
16 changes: 8 additions & 8 deletions src/test/incremental/hashes/call_expressions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub fn change_callee_function() {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirValidated,MirOptimized,TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_callee_function() {
callee2(1, 2)
Expand All @@ -40,7 +40,7 @@ pub fn change_argument_function() {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirValidated,MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized")]
#[rustc_clean(cfg="cfail3")]
pub fn change_argument_function() {
callee1(1, 3)
Expand Down Expand Up @@ -81,7 +81,7 @@ pub fn change_callee_method() {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirValidated,MirOptimized,TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_callee_method() {
let s = Struct;
Expand All @@ -98,7 +98,7 @@ pub fn change_argument_method() {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirValidated,MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized")]
#[rustc_clean(cfg="cfail3")]
pub fn change_argument_method() {
let s = Struct;
Expand All @@ -115,7 +115,7 @@ pub fn change_ufcs_callee_method() {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirValidated,MirOptimized,TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_ufcs_callee_method() {
let s = Struct;
Expand All @@ -132,7 +132,7 @@ pub fn change_argument_method_ufcs() {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirValidated,MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized")]
#[rustc_clean(cfg="cfail3")]
pub fn change_argument_method_ufcs() {
let s = Struct;
Expand All @@ -149,7 +149,7 @@ pub fn change_to_ufcs() {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirValidated,MirOptimized,TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
// One might think this would be expanded in the HirBody/Mir, but it actually
// results in slightly different Hir/Mir.
Expand All @@ -171,7 +171,7 @@ pub mod change_ufcs_callee_indirectly {
#[cfg(not(cfail1))]
use super::Struct2 as Struct;

#[rustc_clean(cfg="cfail2", except="HirBody,MirValidated,MirOptimized,TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized,TypeckTables")]
#[rustc_clean(cfg="cfail3")]


Expand Down
8 changes: 4 additions & 4 deletions src/test/incremental/hashes/closure_expressions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub fn add_parameter() {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized, TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized, TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn add_parameter() {
let x = 0u32;
Expand All @@ -53,7 +53,7 @@ pub fn change_parameter_pattern() {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_parameter_pattern() {
let _ = |&x: &u32| x;
Expand Down Expand Up @@ -84,7 +84,7 @@ pub fn add_type_ascription_to_parameter() {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn add_type_ascription_to_parameter() {
let closure = |x: u32| x + 1u32;
Expand All @@ -101,7 +101,7 @@ pub fn change_parameter_type() {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized, TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized, TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_parameter_type() {
let closure = |x: u16| (x as u64) + 1;
Expand Down
28 changes: 14 additions & 14 deletions src/test/incremental/hashes/enum_constructors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub fn change_field_value_struct_like() -> Enum {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirValidated")]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt")]
#[rustc_clean(cfg="cfail3")]
pub fn change_field_value_struct_like() -> Enum {
Enum::Struct {
Expand Down Expand Up @@ -96,7 +96,7 @@ pub fn change_constructor_path_struct_like() {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirValidated,TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_constructor_path_struct_like() {
let _ = Enum2::Struct {
Expand All @@ -119,7 +119,7 @@ pub fn change_constructor_variant_struct_like() {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirValidated")]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt")]
#[rustc_clean(cfg="cfail3")]
pub fn change_constructor_variant_struct_like() {
let _ = Enum2::Struct2 {
Expand All @@ -139,7 +139,7 @@ pub mod change_constructor_path_indirectly_struct_like {

#[rustc_clean(
cfg="cfail2",
except="FnSignature,Hir,HirBody,MirOptimized,MirValidated,\
except="FnSignature,Hir,HirBody,MirOptimized,MirBuilt,\
TypeckTables"
)]
#[rustc_clean(cfg="cfail3")]
Expand All @@ -161,7 +161,7 @@ pub mod change_constructor_variant_indirectly_struct_like {
#[cfg(not(cfail1))]
use super::Enum2::Struct2 as Variant;

#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirValidated")]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt")]
#[rustc_clean(cfg="cfail3")]
pub fn function() -> Enum2 {
Variant {
Expand All @@ -180,7 +180,7 @@ pub fn change_field_value_tuple_like() -> Enum {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirValidated")]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt")]
#[rustc_clean(cfg="cfail3")]
pub fn change_field_value_tuple_like() -> Enum {
Enum::Tuple(0, 1, 3)
Expand All @@ -197,7 +197,7 @@ pub fn change_constructor_path_tuple_like() {
#[cfg(not(cfail1))]
#[rustc_clean(
cfg="cfail2",
except="HirBody,MirOptimized,MirValidated,TypeckTables"
except="HirBody,MirOptimized,MirBuilt,TypeckTables"
)]
#[rustc_clean(cfg="cfail3")]
pub fn change_constructor_path_tuple_like() {
Expand All @@ -215,7 +215,7 @@ pub fn change_constructor_variant_tuple_like() {
#[cfg(not(cfail1))]
#[rustc_clean(
cfg="cfail2",
except="HirBody,MirOptimized,MirValidated,TypeckTables"
except="HirBody,MirOptimized,MirBuilt,TypeckTables"
)]
#[rustc_clean(cfg="cfail3")]
pub fn change_constructor_variant_tuple_like() {
Expand All @@ -232,7 +232,7 @@ pub mod change_constructor_path_indirectly_tuple_like {

#[rustc_clean(
cfg="cfail2",
except="FnSignature,Hir,HirBody,MirOptimized,MirValidated,\
except="FnSignature,Hir,HirBody,MirOptimized,MirBuilt,\
TypeckTables"
)]
#[rustc_clean(cfg="cfail3")]
Expand All @@ -251,7 +251,7 @@ pub mod change_constructor_variant_indirectly_tuple_like {
#[cfg(not(cfail1))]
use super::Enum2::Tuple2 as Variant;

#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirValidated,TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn function() -> Enum2 {
Variant(0, 1, 2)
Expand All @@ -278,7 +278,7 @@ pub fn change_constructor_path_c_like() {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirValidated,TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_constructor_path_c_like() {
let _ = Clike2::B;
Expand All @@ -293,7 +293,7 @@ pub fn change_constructor_variant_c_like() {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirValidated")]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt")]
#[rustc_clean(cfg="cfail3")]
pub fn change_constructor_variant_c_like() {
let _ = Clike::C;
Expand All @@ -309,7 +309,7 @@ pub mod change_constructor_path_indirectly_c_like {

#[rustc_clean(
cfg="cfail2",
except="FnSignature,Hir,HirBody,MirOptimized,MirValidated,\
except="FnSignature,Hir,HirBody,MirOptimized,MirBuilt,\
TypeckTables"
)]
#[rustc_clean(cfg="cfail3")]
Expand All @@ -328,7 +328,7 @@ pub mod change_constructor_variant_indirectly_c_like {
#[cfg(not(cfail1))]
use super::Clike::B as Variant;

#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirValidated")]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirBuilt")]
#[rustc_clean(cfg="cfail3")]
pub fn function() -> Clike {
Variant
Expand Down
6 changes: 3 additions & 3 deletions src/test/incremental/hashes/exported_vs_not.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub fn body_not_exported_to_metadata() -> u32 {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirValidated,MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized")]
#[rustc_clean(cfg="cfail3")]
pub fn body_not_exported_to_metadata() -> u32 {
2
Expand All @@ -35,7 +35,7 @@ pub fn body_exported_to_metadata_because_of_inline() -> u32 {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirValidated,MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized")]
#[rustc_clean(cfg="cfail3")]
#[inline]
pub fn body_exported_to_metadata_because_of_inline() -> u32 {
Expand All @@ -55,7 +55,7 @@ pub fn body_exported_to_metadata_because_of_generic() -> u32 {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirValidated,MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody,MirBuilt,MirOptimized")]
#[rustc_clean(cfg="cfail3")]
#[inline]
pub fn body_exported_to_metadata_because_of_generic() -> u32 {
Expand Down
16 changes: 8 additions & 8 deletions src/test/incremental/hashes/for_loops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub fn change_loop_body() {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized")]
#[rustc_clean(cfg="cfail3")]
pub fn change_loop_body() {
let mut _x = 0;
Expand All @@ -48,7 +48,7 @@ pub fn change_iteration_variable_name() {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized")]
#[rustc_clean(cfg="cfail3")]
pub fn change_iteration_variable_name() {
let mut _x = 0;
Expand All @@ -71,7 +71,7 @@ pub fn change_iteration_variable_pattern() {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized, TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized, TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn change_iteration_variable_pattern() {
let mut _x = 0;
Expand All @@ -94,7 +94,7 @@ pub fn change_iterable() {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized")]
#[rustc_clean(cfg="cfail3")]
pub fn change_iterable() {
let mut _x = 0;
Expand All @@ -116,7 +116,7 @@ pub fn add_break() {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized, TypeckTables")]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized, TypeckTables")]
#[rustc_clean(cfg="cfail3")]
pub fn add_break() {
let mut _x = 0;
Expand Down Expand Up @@ -187,7 +187,7 @@ pub fn change_break_label() {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized")]
#[rustc_clean(cfg="cfail3")]
pub fn change_break_label() {
let mut _x = 0;
Expand Down Expand Up @@ -237,7 +237,7 @@ pub fn change_continue_label() {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized")]
#[rustc_clean(cfg="cfail3")]
pub fn change_continue_label() {
let mut _x = 0;
Expand All @@ -262,7 +262,7 @@ pub fn change_continue_to_break() {
}

#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")]
#[rustc_clean(cfg="cfail2", except="HirBody, MirBuilt, MirOptimized")]
#[rustc_clean(cfg="cfail3")]
pub fn change_continue_to_break() {
let mut _x = 0;
Expand Down
Loading

0 comments on commit a0f02cd

Please sign in to comment.