Auto merge of #45757 - mikhail-m1:change-mir-dump-filename, r=nikomatsakis

change MIR dump filenames from `rustc.nodeN...` to `rustc.<DefPath>`

r? @nikomatsakis
This commit is contained in:
bors 2017-11-09 20:46:39 +00:00
commit d6b06c63a0
42 changed files with 161 additions and 134 deletions

View File

@ -314,6 +314,29 @@ impl DefPath {
s
}
/// Return filename friendly string of the DefPah without
/// the crate-prefix. This method is useful if you don't have
/// a TyCtxt available.
pub fn to_filename_friendly_no_crate(&self) -> String {
let mut s = String::with_capacity(self.data.len() * 16);
let mut opt_delimiter = None;
for component in &self.data {
opt_delimiter.map(|d| s.push(d));
opt_delimiter = Some('-');
if component.disambiguator == 0 {
write!(s, "{}", component.data.as_interned_str()).unwrap();
} else {
write!(s,
"{}[{}]",
component.data.as_interned_str(),
component.disambiguator)
.unwrap();
}
}
s
}
}
#[derive(Clone, Debug, Eq, PartialEq, Hash, RustcEncodable, RustcDecodable)]

View File

@ -132,9 +132,13 @@ where
let p = Path::new(file_dir);
file_path.push(p);
};
let _ = fs::create_dir_all(&file_path);
let file_name = format!("rustc.node{}{}{}.{}.{}.mir",
source.item_id(), promotion_id, pass_num, pass_name, disambiguator);
let function_name = tcx.hir.def_path_from_id(source.item_id())
.map(|d| d.to_filename_friendly_no_crate())
.unwrap_or(format!("node{}", source.item_id()));
let file_name = format!("rustc.{}{}{}.{}.{}.mir",
function_name, promotion_id, pass_num, pass_name, disambiguator);
file_path.push(&file_name);
let _ = fs::File::create(&file_path).and_then(|mut file| {
writeln!(file, "// MIR for `{}`", node_path)?;

View File

@ -36,7 +36,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.node4.SimplifyCfg-initial.after.mir
// START rustc.main.SimplifyCfg-initial.after.mir
// bb0: {
// StorageLive(_1);
// _1 = const false;
@ -82,4 +82,4 @@ fn main() {
// StorageDead(_1);
// return;
// }
// END rustc.node4.SimplifyCfg-initial.after.mir
// END rustc.main.SimplifyCfg-initial.after.mir

View File

@ -28,7 +28,7 @@ impl Drop for S {
}
// END RUST SOURCE
// START rustc.node4.ElaborateDrops.before.mir
// START rustc.main.ElaborateDrops.before.mir
// let mut _0: ();
// scope 1 {
// let _1: std::boxed::Box<S>;
@ -88,4 +88,4 @@ impl Drop for S {
// return;
// }
// }
// END rustc.node4.ElaborateDrops.before.mir
// END rustc.main.ElaborateDrops.before.mir

View File

@ -19,7 +19,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.node4.CopyPropagation.before.mir
// START rustc.test.CopyPropagation.before.mir
// bb0: {
// ...
// _3 = _1;
@ -31,12 +31,12 @@ fn main() {
// ...
// return;
// }
// END rustc.node4.CopyPropagation.before.mir
// START rustc.node4.CopyPropagation.after.mir
// END rustc.test.CopyPropagation.before.mir
// START rustc.test.CopyPropagation.after.mir
// bb0: {
// ...
// _0 = _1;
// ...
// return;
// }
// END rustc.node4.CopyPropagation.after.mir
// END rustc.test.CopyPropagation.after.mir

View File

@ -24,7 +24,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.node13.Deaggregator.before.mir
// START rustc.bar.Deaggregator.before.mir
// bb0: {
// ...
// _2 = _1;
@ -33,8 +33,8 @@ fn main() {
// ...
// return;
// }
// END rustc.node13.Deaggregator.before.mir
// START rustc.node13.Deaggregator.after.mir
// END rustc.bar.Deaggregator.before.mir
// START rustc.bar.Deaggregator.after.mir
// bb0: {
// ...
// _2 = _1;
@ -45,4 +45,4 @@ fn main() {
// ...
// return;
// }
// END rustc.node13.Deaggregator.after.mir
// END rustc.bar.Deaggregator.after.mir

View File

@ -26,7 +26,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.node10.Deaggregator.before.mir
// START rustc.bar.Deaggregator.before.mir
// bb0: {
// StorageLive(_2);
// _2 = _1;
@ -34,8 +34,8 @@ fn main() {
// StorageDead(_2);
// return;
// }
// END rustc.node10.Deaggregator.before.mir
// START rustc.node10.Deaggregator.after.mir
// END rustc.bar.Deaggregator.before.mir
// START rustc.bar.Deaggregator.after.mir
// bb0: {
// StorageLive(_2);
// _2 = _1;
@ -44,4 +44,4 @@ fn main() {
// StorageDead(_2);
// return;
// }
// END rustc.node10.Deaggregator.after.mir
// END rustc.bar.Deaggregator.after.mir

View File

@ -29,7 +29,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.node12.Deaggregator.before.mir
// START rustc.test1.Deaggregator.before.mir
// bb1: {
// StorageLive(_4);
// _4 = _2;
@ -44,8 +44,8 @@ fn main() {
// StorageDead(_5);
// goto -> bb3;
// }
// END rustc.node12.Deaggregator.before.mir
// START rustc.node12.Deaggregator.after.mir
// END rustc.test1.Deaggregator.before.mir
// START rustc.test1.Deaggregator.after.mir
// bb1: {
// StorageLive(_4);
// _4 = _2;
@ -62,5 +62,5 @@ fn main() {
// StorageDead(_5);
// goto -> bb3;
// }
// END rustc.node12.Deaggregator.after.mir
// END rustc.test1.Deaggregator.after.mir
//

View File

@ -25,7 +25,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.node10.Deaggregator.before.mir
// START rustc.test.Deaggregator.before.mir
// bb0: {
// ...
// _3 = _1;
@ -39,8 +39,8 @@ fn main() {
// ...
// return;
// }
// END rustc.node10.Deaggregator.before.mir
// START rustc.node10.Deaggregator.after.mir
// END rustc.test.Deaggregator.before.mir
// START rustc.test.Deaggregator.after.mir
// bb0: {
// ...
// _3 = _1;
@ -56,4 +56,4 @@ fn main() {
// ...
// return;
// }
// END rustc.node10.Deaggregator.after.mir
// END rustc.test.Deaggregator.after.mir

View File

@ -19,7 +19,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.node4.SimplifyCfg-qualify-consts.after.mir
// START rustc.main.SimplifyCfg-qualify-consts.after.mir
// let mut _0: ();
// ...
// let _1: i32;
@ -37,4 +37,4 @@ fn main() {
// StorageDead(_1);
// return;
// }
// END rustc.node4.SimplifyCfg-qualify-consts.after.mir
// END rustc.main.SimplifyCfg-qualify-consts.after.mir

View File

@ -24,7 +24,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.node4.SimplifyCfg-qualify-consts.after.mir
// START rustc.main.SimplifyCfg-qualify-consts.after.mir
// let mut _0: ();
// ...
// let _2: bool;
@ -69,4 +69,4 @@ fn main() {
// StorageDead(_2);
// goto -> bb1;
// }
// END rustc.node4.SimplifyCfg-qualify-consts.after.mir
// END rustc.main.SimplifyCfg-qualify-consts.after.mir

View File

@ -25,7 +25,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.node4.SimplifyCfg-qualify-consts.after.mir
// START rustc.main.SimplifyCfg-qualify-consts.after.mir
// let mut _0: ();
// ...
// let mut _1: bool;
@ -70,4 +70,4 @@ fn main() {
// StorageDead(_3);
// goto -> bb1;
// }
// END rustc.node4.SimplifyCfg-qualify-consts.after.mir
// END rustc.main.SimplifyCfg-qualify-consts.after.mir

View File

@ -29,7 +29,7 @@ fn foo(i: i32) {
}
// END RUST SOURCE
// START rustc.node4.SimplifyCfg-qualify-consts.after.mir
// START rustc.main.SimplifyCfg-qualify-consts.after.mir
// let mut _0: ();
// ...
// let _1: D;
@ -76,4 +76,4 @@ fn foo(i: i32) {
// StorageDead(_1);
// return;
// }
// END rustc.node4.SimplifyCfg-qualify-consts.after.mir
// END rustc.main.SimplifyCfg-qualify-consts.after.mir

View File

@ -26,7 +26,7 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
}
// END RUST SOURCE
// START rustc.node4.SimplifyCfg-qualify-consts.after.mir
// START rustc.main.SimplifyCfg-qualify-consts.after.mir
// fn main() -> () {
// ...
// let mut _0: ();
@ -64,9 +64,9 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// return;
// }
// }
// END rustc.node4.SimplifyCfg-qualify-consts.after.mir
// END rustc.main.SimplifyCfg-qualify-consts.after.mir
// START rustc.node18.SimplifyCfg-qualify-consts.after.mir
// START rustc.main-{{closure}}.SimplifyCfg-qualify-consts.after.mir
// fn main::{{closure}}(_1: [closure@NodeId(18) d:&'14s D]) -> i32 {
// let mut _0: i32;
// let mut _2: i32;
@ -78,4 +78,4 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// StorageDead(_2);
// return;
// }
// END rustc.node18.SimplifyCfg-qualify-consts.after.mir
// END rustc.main-{{closure}}.SimplifyCfg-qualify-consts.after.mir

View File

@ -26,7 +26,7 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
}
// END RUST SOURCE
// START rustc.node4.SimplifyCfg-qualify-consts.after.mir
// START rustc.main.SimplifyCfg-qualify-consts.after.mir
// fn main() -> () {
// let mut _0: ();
// ...
@ -62,9 +62,9 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// StorageDead(_1);
// return;
// }
// END rustc.node4.SimplifyCfg-qualify-consts.after.mir
// END rustc.main.SimplifyCfg-qualify-consts.after.mir
// START rustc.node22.SimplifyCfg-qualify-consts.after.mir
// START rustc.main-{{closure}}.SimplifyCfg-qualify-consts.after.mir
// fn main::{{closure}}(_1: [closure@NodeId(22) d:&'19s D]) -> i32 {
// let mut _0: i32;
// ...
@ -82,4 +82,4 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// StorageDead(_2);
// return;
// }
// END rustc.node22.SimplifyCfg-qualify-consts.after.mir
// END rustc.main-{{closure}}.SimplifyCfg-qualify-consts.after.mir

View File

@ -26,7 +26,7 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
}
// END RUST SOURCE
// START rustc.node4.SimplifyCfg-qualify-consts.after.mir
// START rustc.main.SimplifyCfg-qualify-consts.after.mir
// fn main() -> () {
// let mut _0: ();
// ...
@ -70,9 +70,9 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// return;
// }
// }
// END rustc.node4.SimplifyCfg-qualify-consts.after.mir
// END rustc.main.SimplifyCfg-qualify-consts.after.mir
// START rustc.node22.SimplifyCfg-qualify-consts.after.mir
// START rustc.main-{{closure}}.SimplifyCfg-qualify-consts.after.mir
// fn main::{{closure}}(_1: [closure@NodeId(22) d:D]) -> i32 {
// let mut _0: i32;
// ...
@ -94,4 +94,4 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// return;
// }
// }
// END rustc.node22.SimplifyCfg-qualify-consts.after.mir
// END rustc.main-{{closure}}.SimplifyCfg-qualify-consts.after.mir

View File

@ -27,7 +27,7 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
}
// END RUST SOURCE
// START rustc.node4.SimplifyCfg-qualify-consts.after.mir
// START rustc.main.SimplifyCfg-qualify-consts.after.mir
// fn main() -> () {
// let mut _0: ();
// ...
@ -69,9 +69,9 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// return;
// }
// }
// END rustc.node4.SimplifyCfg-qualify-consts.after.mir
// END rustc.main.SimplifyCfg-qualify-consts.after.mir
// START rustc.node22.SimplifyCfg-qualify-consts.after.mir
// START rustc.main-{{closure}}.SimplifyCfg-qualify-consts.after.mir
// fn main::{{closure}}(_1: [closure@NodeId(22) r:&'21_1rs D]) -> i32 {
// let mut _0: i32;
// let mut _2: i32;
@ -84,4 +84,4 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// return;
// }
// }
// END rustc.node22.SimplifyCfg-qualify-consts.after.mir
// END rustc.main-{{closure}}.SimplifyCfg-qualify-consts.after.mir

View File

@ -37,7 +37,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.node4.SimplifyCfg-qualify-consts.after.mir
// START rustc.main.SimplifyCfg-qualify-consts.after.mir
// fn main() -> () {
// let mut _0: ();
// ...
@ -84,4 +84,4 @@ fn main() {
// goto -> bb1;
// }
// }
// END rustc.node4.SimplifyCfg-qualify-consts.after.mir
// END rustc.main.SimplifyCfg-qualify-consts.after.mir

View File

@ -39,7 +39,7 @@ fn main() {
fn query() -> bool { true }
// END RUST SOURCE
// START rustc.node16.SimplifyCfg-qualify-consts.after.mir
// START rustc.main.SimplifyCfg-qualify-consts.after.mir
// fn main() -> () {
// let mut _0: ();
// scope 1 {
@ -130,4 +130,4 @@ fn query() -> bool { true }
// goto -> bb1;
// }
// }
// END rustc.node16.SimplifyCfg-qualify-consts.after.mir
// END rustc.main.SimplifyCfg-qualify-consts.after.mir

View File

@ -60,11 +60,11 @@ unsafe impl<'a, #[may_dangle] 'b> Drop for D1<'a, 'b> {
// transformation encoding the effects of rvalue-promotion.
// This may be the simplest and most-likely option; note in
// particular that `StorageDead(_6)` goes away below in
// rustc.node4.QualifyAndPromoteConstants.after.mir
// rustc.main.QualifyAndPromoteConstants.after.mir
// END RUST SOURCE
// START rustc.node4.QualifyAndPromoteConstants.before.mir
// START rustc.main.QualifyAndPromoteConstants.before.mir
// fn main() -> () {
// let mut _0: ();
// let mut _1: &'12ds S1;
@ -113,9 +113,9 @@ unsafe impl<'a, #[may_dangle] 'b> Drop for D1<'a, 'b> {
// return;
// }
// }
// END rustc.node4.QualifyAndPromoteConstants.before.mir
// END rustc.main.QualifyAndPromoteConstants.before.mir
// START rustc.node4.QualifyAndPromoteConstants.after.mir
// START rustc.main.QualifyAndPromoteConstants.after.mir
// fn main() -> () {
// let mut _0: ();
// let mut _1: &'12ds S1;
@ -158,4 +158,4 @@ unsafe impl<'a, #[may_dangle] 'b> Drop for D1<'a, 'b> {
// return;
// }
// }
// END rustc.node4.QualifyAndPromoteConstants.after.mir
// END rustc.main.QualifyAndPromoteConstants.after.mir

View File

@ -21,7 +21,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.node4.SimplifyCfg-initial.after.mir
// START rustc.main.SimplifyCfg-initial.after.mir
// bb0: {
// StorageLive(_1);
// _1 = const false;
@ -48,4 +48,4 @@ fn main() {
// _2 = ();
// goto -> bb1;
// }
// END rustc.node4.SimplifyCfg-initial.after.mir
// END rustc.main.SimplifyCfg-initial.after.mir

View File

@ -35,7 +35,7 @@ impl S {
}
// END RUST SOURCE
// START rustc.node4.ElaborateDrops.after.mir
// START rustc.main.ElaborateDrops.after.mir
// let mut _0: ();
// scope 1 {
// let _1: ();
@ -46,8 +46,8 @@ impl S {
// let mut _4: S;
// let mut _5: bool;
// bb0: {
// END rustc.node4.ElaborateDrops.after.mir
// START rustc.node13.ElaborateDrops.after.mir
// END rustc.main.ElaborateDrops.after.mir
// START rustc.test.ElaborateDrops.after.mir
// let mut _0: ();
// ...
// let _1: S;
@ -59,4 +59,4 @@ impl S {
// let mut _5: S;
// let mut _6: bool;
// bb0: {
// END rustc.node13.ElaborateDrops.after.mir
// END rustc.test.ElaborateDrops.after.mir

View File

@ -23,7 +23,7 @@ fn rc_refcell_test(r: RefCell<i32>) {
fn main() { }
// END RUST SOURCE
// START rustc.node5.SimplifyCfg-qualify-consts.after.mir
// START rustc.rc_refcell_test.SimplifyCfg-qualify-consts.after.mir
//
// fn rc_refcell_test(_1: std::cell::RefCell<i32>) -> () {
// let mut _0: ();

View File

@ -49,7 +49,7 @@ fn main() {
// END RUST SOURCE
//
// START rustc.node17.SimplifyBranches-initial.before.mir
// START rustc.full_tested_match.SimplifyBranches-initial.before.mir
// bb0: {
// ...
// _2 = std::option::Option<i32>::Some(const 42i32,);
@ -104,9 +104,9 @@ fn main() {
// ...
// return;
// }
// END rustc.node17.SimplifyBranches-initial.before.mir
// END rustc.full_tested_match.SimplifyBranches-initial.before.mir
//
// START rustc.node42.SimplifyBranches-initial.before.mir
// START rustc.full_tested_match2.SimplifyBranches-initial.before.mir
// bb0: {
// ...
// _2 = std::option::Option<i32>::Some(const 42i32,);
@ -161,9 +161,9 @@ fn main() {
// ...
// return;
// }
// END rustc.node42.SimplifyBranches-initial.before.mir
// END rustc.full_tested_match2.SimplifyBranches-initial.before.mir
//
// START rustc.node67.SimplifyBranches-initial.before.mir
// START rustc.main.SimplifyBranches-initial.before.mir
// bb0: {
// ...
// _2 = std::option::Option<i32>::Some(const 1i32,);
@ -237,4 +237,4 @@ fn main() {
// ...
// return;
// }
// END rustc.node67.SimplifyBranches-initial.before.mir
// END rustc.main.SimplifyBranches-initial.before.mir

View File

@ -25,7 +25,7 @@ fn main() {
// - `_1` is live when `can_panic` is called (because it may be dropped)
//
// END RUST SOURCE
// START rustc.node12.nll.0.mir
// START rustc.main.nll.0.mir
// | Live variables on entry to bb0: []
// bb0: {
// | Live variables at bb0[0]: []
@ -37,8 +37,8 @@ fn main() {
// | Live variables at bb0[3]: [_2]
// _1 = const <std::boxed::Box<T>>::new(_2) -> bb1;
// }
// END rustc.node12.nll.0.mir
// START rustc.node12.nll.0.mir
// END rustc.main.nll.0.mir
// START rustc.main.nll.0.mir
// | Live variables on entry to bb1: [_1 (drop)]
// bb1: {
// | Live variables at bb1[0]: [_1 (drop)]
@ -48,4 +48,4 @@ fn main() {
// | Live variables at bb1[2]: [_1 (drop)]
// _3 = const can_panic() -> [return: bb2, unwind: bb4];
// }
// END rustc.node12.nll.0.mir
// END rustc.main.nll.0.mir

View File

@ -24,7 +24,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.node12.nll.0.mir
// START rustc.main.nll.0.mir
// | Live variables on entry to bb1: []
// bb1: {
// | Live variables at bb1[0]: []
@ -38,4 +38,4 @@ fn main() {
// | Live variables at bb1[4]: [_4]
// _3 = const use_x(_4) -> bb2;
// }
// END rustc.node12.nll.0.mir
// END rustc.main.nll.0.mir

View File

@ -28,7 +28,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.node18.nll.0.mir
// START rustc.main.nll.0.mir
// | Live variables on entry to bb2: [_1]
// bb2: {
// | Live variables at bb2[0]: [_1]
@ -38,13 +38,13 @@ fn main() {
// | Live variables at bb2[2]: [_4]
// _3 = const make_live(_4) -> bb4;
// }
// END rustc.node18.nll.0.mir
// START rustc.node18.nll.0.mir
// END rustc.main.nll.0.mir
// START rustc.main.nll.0.mir
// | Live variables on entry to bb3: []
// bb3: {
// | Live variables at bb3[0]: []
// _5 = const make_dead() -> bb5;
// }
// END rustc.node18.nll.0.mir
// END rustc.main.nll.0.mir

View File

@ -25,10 +25,10 @@ fn main() {
}
// END RUST SOURCE
// START rustc.node4.nll.0.mir
// START rustc.use_x.nll.0.mir
// | '_#0r: {bb0[0], bb0[1], '_#0r}
// | '_#1r: {bb0[0], bb0[1], '_#0r, '_#1r}
// | '_#2r: {bb0[0], bb0[1], '_#2r}
// ...
// fn use_x(_1: &'_#0r mut i32, _2: &'_#1r u32, _3: &'_#0r u32, _4: &'_#2r u32) -> bool {
// END rustc.node4.nll.0.mir
// END rustc.use_x.nll.0.mir

View File

@ -27,13 +27,13 @@ fn main() {
}
// END RUST SOURCE
// START rustc.node13.nll.0.mir
// START rustc.main.nll.0.mir
// | '_#5r: {bb0[6], bb0[7], bb0[8], bb0[9], bb0[10], bb0[11], bb0[12], bb0[13], bb0[14]}
// ...
// | '_#7r: {bb0[11], bb0[12], bb0[13], bb0[14]}
// END rustc.node13.nll.0.mir
// START rustc.node13.nll.0.mir
// END rustc.main.nll.0.mir
// START rustc.main.nll.0.mir
// let _2: &'_#5r mut i32;
// ...
// let _4: &'_#7r mut i32;
// END rustc.node13.nll.0.mir
// END rustc.main.nll.0.mir

View File

@ -30,21 +30,21 @@ fn main() {
}
// END RUST SOURCE
// START rustc.node12.nll.0.mir
// START rustc.main.nll.0.mir
// | '_#0r: {bb1[1], bb2[0], bb2[1]}
// | '_#1r: {bb1[1], bb2[0], bb2[1]}
// ...
// let _2: &'_#1r usize;
// END rustc.node12.nll.0.mir
// START rustc.node12.nll.0.mir
// END rustc.main.nll.0.mir
// START rustc.main.nll.0.mir
// bb1: {
// | Live variables at bb1[0]: [_1, _3]
// _2 = &'_#0r _1[_3];
// | Live variables at bb1[1]: [_2]
// switchInt(const true) -> [0u8: bb3, otherwise: bb2];
// }
// END rustc.node12.nll.0.mir
// START rustc.node12.nll.0.mir
// END rustc.main.nll.0.mir
// START rustc.main.nll.0.mir
// bb2: {
// | Live variables at bb2[0]: [_2]
// StorageLive(_7);
@ -53,4 +53,4 @@ fn main() {
// | Live variables at bb2[2]: [_7]
// _6 = const use_x(_7) -> bb4;
// }
// END rustc.node12.nll.0.mir
// END rustc.main.nll.0.mir

View File

@ -43,6 +43,6 @@ unsafe impl<#[may_dangle] T> Drop for Wrap<T> {
}
// END RUST SOURCE
// START rustc.node12.nll.0.mir
// START rustc.main.nll.0.mir
// | '_#4r: {bb1[3], bb1[4], bb1[5], bb2[0], bb2[1]}
// END rustc.node12.nll.0.mir
// END rustc.main.nll.0.mir

View File

@ -45,6 +45,6 @@ impl<T> Drop for Wrap<T> {
}
// END RUST SOURCE
// START rustc.node12.nll.0.mir
// START rustc.main.nll.0.mir
// | '_#4r: {bb1[3], bb1[4], bb1[5], bb2[0], bb2[1], bb2[2], bb3[0], bb3[1], bb3[2], bb4[0], bb4[1], bb4[2], bb6[0], bb7[0], bb7[1], bb7[2], bb8[0]}
// END rustc.node12.nll.0.mir
// END rustc.main.nll.0.mir

View File

@ -35,7 +35,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.node12.nll.0.mir
// START rustc.main.nll.0.mir
// | '_#0r: {bb1[1], bb2[0], bb2[1]}
// ...
// | '_#2r: {bb7[2], bb7[3], bb7[4]}
@ -46,4 +46,4 @@ fn main() {
// _2 = &'_#0r _1[_3];
// ...
// _2 = &'_#2r (*_11);
// END rustc.node12.nll.0.mir
// END rustc.main.nll.0.mir

View File

@ -31,12 +31,12 @@ fn main() {
}
// END RUST SOURCE
// START rustc.node12.nll.0.mir
// START rustc.main.nll.0.mir
// | '_#0r: {bb1[1], bb1[2], bb1[3], bb1[4], bb1[5], bb1[6], bb2[0], bb2[1]}
// | '_#1r: {bb1[1], bb1[2], bb1[3], bb1[4], bb1[5], bb1[6], bb2[0], bb2[1]}
// | '_#2r: {bb1[5], bb1[6], bb2[0], bb2[1]}
// END rustc.node12.nll.0.mir
// START rustc.node12.nll.0.mir
// END rustc.main.nll.0.mir
// START rustc.main.nll.0.mir
// let _2: &'_#1r usize;
// ...
// let _6: &'_#2r usize;
@ -46,4 +46,4 @@ fn main() {
// _7 = _2;
// ...
// _6 = _7;
// END rustc.node12.nll.0.mir
// END rustc.main.nll.0.mir

View File

@ -15,13 +15,13 @@ fn main() {
}
// END RUST SOURCE
// START rustc.node4.SimplifyBranches-initial.before.mir
// START rustc.main.SimplifyBranches-initial.before.mir
// bb0: {
// switchInt(const false) -> [0u8: bb2, otherwise: bb1];
// }
// END rustc.node4.SimplifyBranches-initial.before.mir
// START rustc.node4.SimplifyBranches-initial.after.mir
// END rustc.main.SimplifyBranches-initial.before.mir
// START rustc.main.SimplifyBranches-initial.after.mir
// bb0: {
// goto -> bb2;
// }
// END rustc.node4.SimplifyBranches-initial.after.mir
// END rustc.main.SimplifyBranches-initial.after.mir

View File

@ -44,7 +44,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.node4.mir_map.0.mir
// START rustc.XXX.mir_map.0.mir
// let mut _0: &'static Foo;
// let mut _1: &'static Foo;
// let mut _2: Foo;
@ -197,4 +197,4 @@ fn main() {
// return;
// }
//}
// END rustc.node4.mir_map.0.mir
// END rustc.XXX.mir_map.0.mir

View File

@ -19,7 +19,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.node4.TypeckMir.before.mir
// START rustc.main.TypeckMir.before.mir
// bb0: {
// StorageLive(_1);
// _1 = const 0i32;
@ -40,4 +40,4 @@ fn main() {
// StorageDead(_1);
// return;
// }
// END rustc.node4.TypeckMir.before.mir
// END rustc.main.TypeckMir.before.mir

View File

@ -28,14 +28,14 @@ fn main() {
}
// END RUST SOURCE
// START rustc.node12.EraseRegions.after.mir
// START rustc.{{impl}}-foo.EraseRegions.after.mir
// bb0: {
// Validate(Acquire, [_1: &ReFree(DefId { krate: CrateNum(0), index: DefIndex(0:5) => validate_1[317d]::{{impl}}[0]::foo[0] }, BrAnon(0)) Test, _2: &ReFree(DefId { krate: CrateNum(0), index: DefIndex(0:5) => validate_1[317d]::{{impl}}[0]::foo[0] }, BrAnon(1)) mut i32]);
// ...
// return;
// }
// END rustc.node12.EraseRegions.after.mir
// START rustc.node23.EraseRegions.after.mir
// END rustc.{{impl}}-foo.EraseRegions.after.mir
// START rustc.main.EraseRegions.after.mir
// fn main() -> () {
// ...
// bb0: {
@ -57,8 +57,8 @@ fn main() {
// return;
// }
// }
// END rustc.node23.EraseRegions.after.mir
// START rustc.node50.EraseRegions.after.mir
// END rustc.main.EraseRegions.after.mir
// START rustc.main-{{closure}}.EraseRegions.after.mir
// fn main::{{closure}}(_1: &ReErased [closure@NodeId(50)], _2: &ReErased mut i32) -> i32 {
// ...
// bb0: {
@ -76,4 +76,4 @@ fn main() {
// return;
// }
// }
// END rustc.node50.EraseRegions.after.mir
// END rustc.main-{{closure}}.EraseRegions.after.mir

View File

@ -16,7 +16,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.node4.EraseRegions.after.mir
// START rustc.main.EraseRegions.after.mir
// fn main() -> () {
// ...
// bb1: {
@ -32,4 +32,4 @@ fn main() {
// }
// ...
// }
// END rustc.node4.EraseRegions.after.mir
// END rustc.main.EraseRegions.after.mir

View File

@ -28,7 +28,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.node16.EraseRegions.after.mir
// START rustc.main.EraseRegions.after.mir
// fn main() -> () {
// ...
// let mut _5: &ReErased i32;
@ -62,4 +62,4 @@ fn main() {
// return;
// }
// }
// END rustc.node16.EraseRegions.after.mir
// END rustc.main.EraseRegions.after.mir

View File

@ -36,7 +36,7 @@ fn main() {
// contain name of the source file, so we cannot test for it.
// END RUST SOURCE
// START rustc.node4.EraseRegions.after.mir
// START rustc.write_42.EraseRegions.after.mir
// fn write_42(_1: *mut i32) -> bool {
// ...
// bb0: {
@ -46,8 +46,8 @@ fn main() {
// return;
// }
// }
// END rustc.node4.EraseRegions.after.mir
// START rustc.node22.EraseRegions.after.mir
// END rustc.write_42.EraseRegions.after.mir
// START rustc.write_42-{{closure}}.EraseRegions.after.mir
// fn write_42::{{closure}}(_1: &ReErased [closure@NodeId(22)], _2: *mut i32) -> () {
// ...
// bb0: {
@ -57,8 +57,8 @@ fn main() {
// return;
// }
// }
// END rustc.node22.EraseRegions.after.mir
// START rustc.node31.EraseRegions.after.mir
// END rustc.write_42-{{closure}}.EraseRegions.after.mir
// START rustc.test.EraseRegions.after.mir
// fn test(_1: &ReErased mut i32) -> () {
// ...
// bb0: {
@ -73,8 +73,8 @@ fn main() {
// ...
// }
// }
// END rustc.node31.EraseRegions.after.mir
// START rustc.node60.EraseRegions.after.mir
// END rustc.test.EraseRegions.after.mir
// START rustc.main-{{closure}}.EraseRegions.after.mir
// fn main::{{closure}}(_1: &ReErased [closure@NodeId(60)], _2: &ReErased mut i32) -> bool {
// ...
// bb0: {
@ -86,4 +86,4 @@ fn main() {
// }
// ...
// }
// END rustc.node60.EraseRegions.after.mir
// END rustc.main-{{closure}}.EraseRegions.after.mir

View File

@ -33,7 +33,7 @@ fn main() {
}
// END RUST SOURCE
// START rustc.node17.EraseRegions.after.mir
// START rustc.test.EraseRegions.after.mir
// fn test(_1: &ReErased mut i32) -> () {
// ...
// bb0: {
@ -44,8 +44,8 @@ fn main() {
// }
// ...
// }
// END rustc.node17.EraseRegions.after.mir
// START rustc.node46.EraseRegions.after.mir
// END rustc.test.EraseRegions.after.mir
// START rustc.main-{{closure}}.EraseRegions.after.mir
// fn main::{{closure}}(_1: &ReErased [closure@NodeId(46)], _2: &ReErased mut i32) -> bool {
// ...
// bb0: {
@ -63,4 +63,4 @@ fn main() {
// }
// ...
// }
// END rustc.node46.EraseRegions.after.mir
// END rustc.main-{{closure}}.EraseRegions.after.mir