Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incr.comp.: Remove ability to produce incr. comp. hashes during metadata export. #46370

Merged
merged 2 commits into from
Dec 1, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
incr.comp.: Update test cases after metadata hashing removal.
  • Loading branch information
michaelwoerister committed Nov 29, 2017
commit 7ebccbb7a4003e036cae61c575ac7edb871a8259
22 changes: 4 additions & 18 deletions src/test/incremental/hashes/call_expressions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ pub fn change_callee_function() {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirValidated,MirOptimized,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
pub fn change_callee_function() {
callee2(1, 2)
}
Expand All @@ -55,8 +53,6 @@ pub fn change_argument_function() {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirValidated,MirOptimized")]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
pub fn change_argument_function() {
callee1(1, 3)
}
Expand All @@ -74,8 +70,8 @@ mod change_callee_indirectly_function {
#[rustc_clean(label="Hir", cfg="cfail3")]
#[rustc_dirty(label="HirBody", cfg="cfail2")]
#[rustc_clean(label="HirBody", cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]


pub fn change_callee_indirectly_function() {
callee(1, 2)
}
Expand All @@ -98,8 +94,6 @@ pub fn change_callee_method() {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirValidated,MirOptimized,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
pub fn change_callee_method() {
let s = Struct;
s.method2('x', true);
Expand All @@ -117,8 +111,6 @@ pub fn change_argument_method() {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirValidated,MirOptimized")]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
pub fn change_argument_method() {
let s = Struct;
s.method1('y', true);
Expand All @@ -136,8 +128,6 @@ pub fn change_ufcs_callee_method() {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirValidated,MirOptimized,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
pub fn change_ufcs_callee_method() {
let s = Struct;
Struct::method2(&s, 'x', true);
Expand All @@ -155,8 +145,6 @@ pub fn change_argument_method_ufcs() {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirValidated,MirOptimized")]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
pub fn change_argument_method_ufcs() {
let s = Struct;
Struct::method1(&s, 'x', false);
Expand All @@ -174,8 +162,6 @@ pub fn change_to_ufcs() {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirValidated,MirOptimized,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
// One might think this would be expanded in the HirBody/Mir, but it actually
// results in slightly different Hir/Mir.
pub fn change_to_ufcs() {
Expand All @@ -198,8 +184,8 @@ pub mod change_ufcs_callee_indirectly {

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


pub fn change_ufcs_callee_indirectly() {
let s = Struct;
Struct::method1(&s, 'q', false)
Expand Down
12 changes: 0 additions & 12 deletions src/test/incremental/hashes/closure_expressions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ fn change_closure_body() {
#[rustc_clean(label="Hir", cfg="cfail3")]
#[rustc_dirty(label="HirBody", cfg="cfail2")]
#[rustc_clean(label="HirBody", cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
fn change_closure_body() {
let _ = || 3u32;
}
Expand All @@ -56,8 +54,6 @@ fn add_parameter() {
#[rustc_clean(label="Hir", cfg="cfail3")]
#[rustc_dirty(label="HirBody", cfg="cfail2")]
#[rustc_clean(label="HirBody", cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
fn add_parameter() {
let x = 0u32;
let _ = |x: u32| x + 1;
Expand All @@ -76,8 +72,6 @@ fn change_parameter_pattern() {
#[rustc_clean(label="Hir", cfg="cfail3")]
#[rustc_dirty(label="HirBody", cfg="cfail2")]
#[rustc_clean(label="HirBody", cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
fn change_parameter_pattern() {
let _ = |&x: &u32| x;
}
Expand All @@ -95,8 +89,6 @@ fn add_move() {
#[rustc_clean(label="Hir", cfg="cfail3")]
#[rustc_dirty(label="HirBody", cfg="cfail2")]
#[rustc_clean(label="HirBody", cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
fn add_move() {
let _ = move || 1;
}
Expand All @@ -115,8 +107,6 @@ fn add_type_ascription_to_parameter() {
#[rustc_clean(label="Hir", cfg="cfail3")]
#[rustc_dirty(label="HirBody", cfg="cfail2")]
#[rustc_clean(label="HirBody", cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
fn add_type_ascription_to_parameter() {
let closure = |x: u32| x + 1u32;
let _: u32 = closure(1);
Expand All @@ -136,8 +126,6 @@ fn change_parameter_type() {
#[rustc_clean(label="Hir", cfg="cfail3")]
#[rustc_dirty(label="HirBody", cfg="cfail2")]
#[rustc_clean(label="HirBody", cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
fn change_parameter_type() {
let closure = |x: u16| (x as u64) + 1;
let _ = closure(1);
Expand Down
17 changes: 0 additions & 17 deletions src/test/incremental/hashes/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ const CONST_VISIBILITY: u8 = 0;
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="Hir,HirBody")]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_dirty(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
pub const CONST_VISIBILITY: u8 = 0;


Expand All @@ -44,8 +42,6 @@ const CONST_CHANGE_TYPE_1: i32 = 0;
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_dirty(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
const CONST_CHANGE_TYPE_1: u32 = 0;


Expand All @@ -56,15 +52,12 @@ const CONST_CHANGE_TYPE_2: Option<u32> = None;
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_dirty(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
const CONST_CHANGE_TYPE_2: Option<u64> = None;


// Change value between simple literals ---------------------------------------
#[rustc_clean(cfg="cfail2", except="HirBody")]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail3")]
const CONST_CHANGE_VALUE_1: i16 = {
#[cfg(cfail1)]
{ 1 }
Expand All @@ -77,8 +70,6 @@ const CONST_CHANGE_VALUE_1: i16 = {
// Change value between expressions -------------------------------------------
#[rustc_clean(cfg="cfail2", except="HirBody")]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_dirty(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
const CONST_CHANGE_VALUE_2: i16 = {
#[cfg(cfail1)]
{ 1 + 1 }
Expand All @@ -89,8 +80,6 @@ const CONST_CHANGE_VALUE_2: i16 = {

#[rustc_clean(cfg="cfail2", except="HirBody")]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_dirty(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
const CONST_CHANGE_VALUE_3: i16 = {
#[cfg(cfail1)]
{ 2 + 3 }
Expand All @@ -101,8 +90,6 @@ const CONST_CHANGE_VALUE_3: i16 = {

#[rustc_clean(cfg="cfail2", except="HirBody")]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_dirty(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
const CONST_CHANGE_VALUE_4: i16 = {
#[cfg(cfail1)]
{ 1 + 2 * 3 }
Expand All @@ -125,13 +112,9 @@ mod const_change_type_indirectly {

#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_dirty(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
const CONST_CHANGE_TYPE_INDIRECTLY_1: Type = Type;

#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_dirty(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
const CONST_CHANGE_TYPE_INDIRECTLY_2: Option<Type> = None;
}
29 changes: 0 additions & 29 deletions src/test/incremental/hashes/enum_constructors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ pub fn change_field_value_struct_like() -> Enum {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirValidated")]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
pub fn change_field_value_struct_like() -> Enum {
Enum::Struct {
x: 0,
Expand All @@ -72,8 +70,6 @@ pub fn change_field_order_struct_like() -> Enum {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
// FIXME(michaelwoerister):Interesting. I would have thought that that changes the MIR. And it
// would if it were not all constants
pub fn change_field_order_struct_like() -> Enum {
Expand Down Expand Up @@ -113,8 +109,6 @@ pub fn change_constructor_path_struct_like() {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirValidated,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
pub fn change_constructor_path_struct_like() {
let _ = Enum2::Struct {
x: 0,
Expand All @@ -138,8 +132,6 @@ pub fn change_constructor_variant_struct_like() {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirValidated")]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
pub fn change_constructor_variant_struct_like() {
let _ = Enum2::Struct2 {
x: 0,
Expand All @@ -162,8 +154,6 @@ pub mod change_constructor_path_indirectly_struct_like {
TypeckTables"
)]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_dirty(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
pub fn function() -> TheEnum {
TheEnum::Struct {
x: 0,
Expand All @@ -184,8 +174,6 @@ pub mod change_constructor_variant_indirectly_struct_like {

#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirValidated")]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
pub fn function() -> Enum2 {
Variant {
x: 0,
Expand All @@ -205,8 +193,6 @@ pub fn change_field_value_tuple_like() -> Enum {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirValidated")]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
pub fn change_field_value_tuple_like() -> Enum {
Enum::Tuple(0, 1, 3)
}
Expand All @@ -225,8 +211,6 @@ pub fn change_constructor_path_tuple_like() {
except="HirBody,MirOptimized,MirValidated,TypeckTables"
)]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
pub fn change_constructor_path_tuple_like() {
let _ = Enum2::Tuple(0, 1, 2);
}
Expand All @@ -245,8 +229,6 @@ pub fn change_constructor_variant_tuple_like() {
except="HirBody,MirOptimized,MirValidated,TypeckTables"
)]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
pub fn change_constructor_variant_tuple_like() {
let _ = Enum2::Tuple2(0, 1, 2);
}
Expand All @@ -265,8 +247,6 @@ pub mod change_constructor_path_indirectly_tuple_like {
TypeckTables"
)]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_dirty(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
pub fn function() -> TheEnum {
TheEnum::Tuple(0, 1, 2)
}
Expand All @@ -284,8 +264,6 @@ pub mod change_constructor_variant_indirectly_tuple_like {

#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirValidated,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
pub fn function() -> Enum2 {
Variant(0, 1, 2)
}
Expand Down Expand Up @@ -313,7 +291,6 @@ pub fn change_constructor_path_c_like() {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirValidated,TypeckTables")]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail3")]
pub fn change_constructor_path_c_like() {
let _ = Clike2::B;
}
Expand All @@ -329,8 +306,6 @@ pub fn change_constructor_variant_c_like() {
#[cfg(not(cfail1))]
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirValidated")]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
pub fn change_constructor_variant_c_like() {
let _ = Clike::C;
}
Expand All @@ -349,8 +324,6 @@ pub mod change_constructor_path_indirectly_c_like {
TypeckTables"
)]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_dirty(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
pub fn function() -> TheEnum {
TheEnum::B
}
Expand All @@ -368,8 +341,6 @@ pub mod change_constructor_variant_indirectly_c_like {

#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirValidated")]
#[rustc_clean(cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
pub fn function() -> Clike {
Variant
}
Expand Down
Loading