Skip to content

Commit

Permalink
Rollup merge of rust-lang#45148 - gaurikholkar:master, r=nikomatsakis
Browse files Browse the repository at this point in the history
Update let-expressions.rs with DepNode labels

As a part of rust-lang#44924, the PR has tests verified for the following dependency nodes for **let-expressions**
```
- MirValidated
- MirOptimized
- TypeCheckTables
- TypeOfItem
- GenericsOfItem
- PredicatesOfItem
- FnSignature
```

As we are more concerned with the function body,  the following fingerprints do not change over compilation sessions.
```- TypeOfItem
- GenericsOfItem
- PredicatesOfItem
- FnSignature
```

r? @nikomatsakis
cc @michaelwoerister

P.S. Will add more tests as and when possible :)
  • Loading branch information
steveklabnik authored Oct 11, 2017
2 parents 0a0bec7 + 29b576e commit eac9138
Showing 1 changed file with 160 additions and 0 deletions.
160 changes: 160 additions & 0 deletions src/test/incremental/hashes/let_expressions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,20 @@ pub fn change_name() {
#[rustc_clean(label="HirBody", cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
#[rustc_dirty(label="MirValidated", cfg="cfail2")]
#[rustc_clean(label="MirValidated", cfg="cfail3")]
#[rustc_dirty(label="MirOptimized", cfg="cfail2")]
#[rustc_clean(label="MirOptimized", cfg="cfail3")]
#[rustc_clean(label="TypeckTables", cfg="cfail2")]
#[rustc_clean(label="TypeckTables", cfg="cfail3")]
#[rustc_clean(label="TypeOfItem", cfg="cfail2")]
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
#[rustc_clean(label="FnSignature", cfg="cfail2")]
#[rustc_clean(label="FnSignature", cfg="cfail3")]
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
pub fn change_name() {
let _y = 2u64;
}
Expand All @@ -57,6 +71,20 @@ pub fn add_type() {
#[rustc_clean(label="HirBody", cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
#[rustc_clean(label="MirValidated", cfg="cfail2")]
#[rustc_clean(label="MirValidated", cfg="cfail3")]
#[rustc_clean(label="MirOptimized", cfg="cfail2")]
#[rustc_clean(label="MirOptimized", cfg="cfail3")]
#[rustc_dirty(label="TypeckTables", cfg="cfail2")]
#[rustc_clean(label="TypeckTables", cfg="cfail3")]
#[rustc_clean(label="TypeOfItem", cfg="cfail2")]
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
#[rustc_clean(label="FnSignature", cfg="cfail2")]
#[rustc_clean(label="FnSignature", cfg="cfail3")]
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
pub fn add_type() {
let _x: u32 = 2u32;
}
Expand All @@ -76,6 +104,20 @@ pub fn change_type() {
#[rustc_clean(label="HirBody", cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
#[rustc_dirty(label="MirValidated", cfg="cfail2")]
#[rustc_clean(label="MirValidated", cfg="cfail3")]
#[rustc_dirty(label="MirOptimized", cfg="cfail2")]
#[rustc_clean(label="MirOptimized", cfg="cfail3")]
#[rustc_dirty(label="TypeckTables", cfg="cfail2")]
#[rustc_clean(label="TypeckTables", cfg="cfail3")]
#[rustc_clean(label="TypeOfItem", cfg="cfail2")]
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
#[rustc_clean(label="FnSignature", cfg="cfail2")]
#[rustc_clean(label="FnSignature", cfg="cfail3")]
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
pub fn change_type() {
let _x: u8 = 2;
}
Expand All @@ -95,6 +137,20 @@ pub fn change_mutability_of_reference_type() {
#[rustc_clean(label="HirBody", cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
#[rustc_dirty(label="MirValidated", cfg="cfail2")]
#[rustc_clean(label="MirValidated", cfg="cfail3")]
#[rustc_clean(label="MirOptimized", cfg="cfail2")]
#[rustc_clean(label="MirOptimized", cfg="cfail3")]
#[rustc_dirty(label="TypeckTables", cfg="cfail2")]
#[rustc_clean(label="TypeckTables", cfg="cfail3")]
#[rustc_clean(label="TypeOfItem", cfg="cfail2")]
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
#[rustc_clean(label="FnSignature", cfg="cfail2")]
#[rustc_clean(label="FnSignature", cfg="cfail3")]
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
pub fn change_mutability_of_reference_type() {
let _x: &mut u64;
}
Expand All @@ -114,6 +170,20 @@ pub fn change_mutability_of_slot() {
#[rustc_clean(label="HirBody", cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
#[rustc_dirty(label="MirValidated", cfg="cfail2")]
#[rustc_clean(label="MirValidated", cfg="cfail3")]
#[rustc_dirty(label="MirOptimized", cfg="cfail2")]
#[rustc_clean(label="MirOptimized", cfg="cfail3")]
#[rustc_dirty(label="TypeckTables", cfg="cfail2")]
#[rustc_clean(label="TypeckTables", cfg="cfail3")]
#[rustc_clean(label="TypeOfItem", cfg="cfail2")]
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
#[rustc_clean(label="FnSignature", cfg="cfail2")]
#[rustc_clean(label="FnSignature", cfg="cfail3")]
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
pub fn change_mutability_of_slot() {
let _x: u64 = 0;
}
Expand All @@ -133,6 +203,20 @@ pub fn change_simple_binding_to_pattern() {
#[rustc_clean(label="HirBody", cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
#[rustc_dirty(label="MirValidated", cfg="cfail2")]
#[rustc_clean(label="MirValidated", cfg="cfail3")]
#[rustc_dirty(label="MirOptimized", cfg="cfail2")]
#[rustc_clean(label="MirOptimized", cfg="cfail3")]
#[rustc_dirty(label="TypeckTables", cfg="cfail2")]
#[rustc_clean(label="TypeckTables", cfg="cfail3")]
#[rustc_clean(label="TypeOfItem", cfg="cfail2")]
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
#[rustc_clean(label="FnSignature", cfg="cfail2")]
#[rustc_clean(label="FnSignature", cfg="cfail3")]
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
pub fn change_simple_binding_to_pattern() {
let (_a, _b) = (0u8, 'x');
}
Expand All @@ -152,6 +236,20 @@ pub fn change_name_in_pattern() {
#[rustc_clean(label="HirBody", cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
#[rustc_dirty(label="MirValidated", cfg="cfail2")]
#[rustc_clean(label="MirValidated", cfg="cfail3")]
#[rustc_dirty(label="MirOptimized", cfg="cfail2")]
#[rustc_clean(label="MirOptimized", cfg="cfail3")]
#[rustc_clean(label="TypeckTables", cfg="cfail2")]
#[rustc_clean(label="TypeckTables", cfg="cfail3")]
#[rustc_clean(label="TypeOfItem", cfg="cfail2")]
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
#[rustc_clean(label="FnSignature", cfg="cfail2")]
#[rustc_clean(label="FnSignature", cfg="cfail3")]
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
pub fn change_name_in_pattern() {
let (_a, _c) = (1u8, 'y');
}
Expand All @@ -171,6 +269,20 @@ pub fn add_ref_in_pattern() {
#[rustc_clean(label="HirBody", cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
#[rustc_dirty(label="MirValidated", cfg="cfail2")]
#[rustc_clean(label="MirValidated", cfg="cfail3")]
#[rustc_dirty(label="MirOptimized", cfg="cfail2")]
#[rustc_clean(label="MirOptimized", cfg="cfail3")]
#[rustc_dirty(label="TypeckTables", cfg="cfail2")]
#[rustc_clean(label="TypeckTables", cfg="cfail3")]
#[rustc_clean(label="TypeOfItem", cfg="cfail2")]
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
#[rustc_clean(label="FnSignature", cfg="cfail2")]
#[rustc_clean(label="FnSignature", cfg="cfail3")]
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
pub fn add_ref_in_pattern() {
let (ref _a, _b) = (1u8, 'y');
}
Expand All @@ -190,6 +302,12 @@ pub fn add_amp_in_pattern() {
#[rustc_clean(label="HirBody", cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
#[rustc_dirty(label="MirValidated", cfg="cfail2")]
#[rustc_clean(label="MirValidated", cfg="cfail3")]
#[rustc_dirty(label="MirOptimized", cfg="cfail2")]
#[rustc_clean(label="MirOptimized", cfg="cfail3")]
#[rustc_dirty(label="TypeckTables", cfg="cfail2")]
#[rustc_clean(label="TypeckTables", cfg="cfail3")]
pub fn add_amp_in_pattern() {
let (&_a, _b) = (&1u8, 'y');
}
Expand All @@ -209,6 +327,20 @@ pub fn change_mutability_of_binding_in_pattern() {
#[rustc_clean(label="HirBody", cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
#[rustc_dirty(label="MirValidated", cfg="cfail2")]
#[rustc_clean(label="MirValidated", cfg="cfail3")]
#[rustc_dirty(label="MirOptimized", cfg="cfail2")]
#[rustc_clean(label="MirOptimized", cfg="cfail3")]
#[rustc_dirty(label="TypeckTables", cfg="cfail2")]
#[rustc_clean(label="TypeckTables", cfg="cfail3")]
#[rustc_clean(label="TypeOfItem", cfg="cfail2")]
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
#[rustc_clean(label="FnSignature", cfg="cfail2")]
#[rustc_clean(label="FnSignature", cfg="cfail3")]
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
pub fn change_mutability_of_binding_in_pattern() {
let (mut _a, _b) = (99u8, 'q');
}
Expand All @@ -228,6 +360,20 @@ pub fn add_initializer() {
#[rustc_clean(label="HirBody", cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
#[rustc_dirty(label="MirValidated", cfg="cfail2")]
#[rustc_clean(label="MirValidated", cfg="cfail3")]
#[rustc_dirty(label="MirOptimized", cfg="cfail2")]
#[rustc_clean(label="MirOptimized", cfg="cfail3")]
#[rustc_dirty(label="TypeckTables", cfg="cfail2")]
#[rustc_clean(label="TypeckTables", cfg="cfail3")]
#[rustc_clean(label="TypeOfItem", cfg="cfail2")]
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
#[rustc_clean(label="FnSignature", cfg="cfail2")]
#[rustc_clean(label="FnSignature", cfg="cfail3")]
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
pub fn add_initializer() {
let _x: i16 = 3i16;
}
Expand All @@ -247,6 +393,20 @@ pub fn change_initializer() {
#[rustc_clean(label="HirBody", cfg="cfail3")]
#[rustc_metadata_clean(cfg="cfail2")]
#[rustc_metadata_clean(cfg="cfail3")]
#[rustc_dirty(label="MirValidated", cfg="cfail2")]
#[rustc_clean(label="MirValidated", cfg="cfail3")]
#[rustc_dirty(label="MirOptimized", cfg="cfail2")]
#[rustc_clean(label="MirOptimized", cfg="cfail3")]
#[rustc_clean(label="TypeckTables", cfg="cfail2")]
#[rustc_clean(label="TypeckTables", cfg="cfail3")]
#[rustc_clean(label="TypeOfItem", cfg="cfail2")]
#[rustc_clean(label="TypeOfItem", cfg="cfail3")]
#[rustc_clean(label="GenericsOfItem", cfg="cfail2")]
#[rustc_clean(label="GenericsOfItem", cfg="cfail3")]
#[rustc_clean(label="FnSignature", cfg="cfail2")]
#[rustc_clean(label="FnSignature", cfg="cfail3")]
#[rustc_clean(label="PredicatesOfItem", cfg="cfail2")]
#[rustc_clean(label="PredicatesOfItem", cfg="cfail3")]
pub fn change_initializer() {
let _x = 5u16;
}

0 comments on commit eac9138

Please sign in to comment.