Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upUpdate fingerprint tests macros #46523
Conversation
CrockAgile
added some commits
Dec 5, 2017
rust-highfive
assigned
michaelwoerister
Dec 5, 2017
This comment has been minimized.
This comment has been minimized.
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @michaelwoerister (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
This comment has been minimized.
This comment has been minimized.
|
Between these and the previous updates I contributed, I gained decent deduction skills as to which artifacts (HirBody/MirValidated/etc) should change in response to certain code changes. This indicates to me that tagging mentor issues is working I did encounter one issue which confused my intuition and sparked a bit of curiosity. // while_let_loops.rs
#[cfg(cfail1)]
pub fn change_continue_label() {
let mut _x = 0;
'outer: while true {
'inner: while true {
_x = 1;
continue 'inner;
}
}
}
#[cfg(not(cfail1))]
#[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 {
_x = 1;
continue 'outer;
}
}
}
// while_let_loops.rs
#[cfg(cfail1)]
pub fn change_continue_label() {
let mut _x = 0;
'outer: while let Some(0u32) = None {
'inner: while let Some(0u32) = None {
_x = 1;
continue 'inner;
}
}
}
#[cfg(not(cfail1))]
#[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 {
_x = 1;
continue 'outer;
}
}
}In the "while loop" case, only HirBody and MirValidated are dirty. It is a little strange that only MirValidated is dirty and not MirOptimized, but I assume this is because optimization gives identical results regardless of label. But if this is the case for "while loops", why is it not for "while let loops"? Instead, "while let loops" give a dirty MirOptimized as well as TypeckTables. This may not be important, but since it was the only bit of code which gave me unintuitive results I thought I should bring it up. |
CrockAgile
referenced this pull request
Dec 5, 2017
Closed
incr.comp.: Update fingerprint-based auto tests for red/green tracking. #44924
kennytm
added
the
S-waiting-on-review
label
Dec 6, 2017
This comment has been minimized.
This comment has been minimized.
|
Wow, thanks a lot, @CrockAgile! I'll review as soon as I find the time.
That's curious indeed. However looking at the MIR on play.rust-lang.org, both versions are the same for the vanilla |
This comment has been minimized.
This comment has been minimized.
|
Looks good to me. Thanks, @CrockAgile! @bors r+ |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
@bors p=1 |
bors
added a commit
that referenced
this pull request
Dec 7, 2017
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
|
CrockAgile commentedDec 5, 2017
Part of #44924
r? @michaelwoerister