rust/tests/mir-opt/no_spurious_drop_after_call.main.ElaborateDrops.before.mir

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
3.2 KiB
Rust
Raw Normal View History

2020-04-02 16:09:01 -05:00
// MIR for `main` before ElaborateDrops
fn main() -> () {
2022-11-02 16:54:49 -05:00
let mut _0: (); // return place in scope 0 at $DIR/no_spurious_drop_after_call.rs:+0:11: +0:11
let _1: (); // in scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:5: +1:35
let mut _2: std::string::String; // in scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:20: +1:34
let mut _3: &str; // in scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:20: +1:34
let _4: &str; // in scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:20: +1:22
2020-04-02 16:09:01 -05:00
bb0: {
2022-11-02 16:54:49 -05:00
StorageLive(_1); // scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:5: +1:35
StorageLive(_2); // scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:20: +1:34
StorageLive(_3); // scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:20: +1:34
StorageLive(_4); // scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:20: +1:22
_4 = const ""; // scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:20: +1:22
2020-04-02 16:09:01 -05:00
// mir::Constant
2022-11-02 16:54:49 -05:00
// + span: $DIR/no_spurious_drop_after_call.rs:9:20: 9:22
2022-05-06 03:58:54 -05:00
// + literal: Const { ty: &str, val: Value(Slice(..)) }
2022-11-02 16:54:49 -05:00
_3 = &(*_4); // scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:20: +1:34
_2 = <str as ToString>::to_string(move _3) -> bb1; // scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:20: +1:34
2020-04-02 16:09:01 -05:00
// mir::Constant
2022-11-02 16:54:49 -05:00
// + span: $DIR/no_spurious_drop_after_call.rs:9:23: 9:32
2022-09-21 10:57:30 -05:00
// + literal: Const { ty: for<'a> fn(&'a str) -> String {<str as ToString>::to_string}, val: Value(<ZST>) }
2020-04-02 16:09:01 -05:00
}
2020-10-02 15:11:24 -05:00
bb1: {
2022-11-02 16:54:49 -05:00
StorageDead(_3); // scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:33: +1:34
_1 = std::mem::drop::<String>(move _2) -> [return: bb2, unwind: bb3]; // scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:5: +1:35
2020-04-02 16:09:01 -05:00
// mir::Constant
2022-11-02 16:54:49 -05:00
// + span: $DIR/no_spurious_drop_after_call.rs:9:5: 9:19
2022-07-06 09:14:46 -05:00
// + literal: Const { ty: fn(String) {std::mem::drop::<String>}, val: Value(<ZST>) }
2020-04-02 16:09:01 -05:00
}
2020-10-02 15:11:24 -05:00
bb2: {
2022-11-02 16:54:49 -05:00
StorageDead(_2); // scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:34: +1:35
StorageDead(_4); // scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:35: +1:36
StorageDead(_1); // scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:35: +1:36
_0 = const (); // scope 0 at $DIR/no_spurious_drop_after_call.rs:+0:11: +2:2
return; // scope 0 at $DIR/no_spurious_drop_after_call.rs:+2:2: +2:2
2020-04-02 16:09:01 -05:00
}
bb3 (cleanup): {
2023-04-05 03:17:40 -05:00
drop(_2) -> [return: bb4, unwind terminate]; // scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:34: +1:35
}
bb4 (cleanup): {
2022-11-02 16:54:49 -05:00
resume; // scope 0 at $DIR/no_spurious_drop_after_call.rs:+0:1: +2:2
}
2020-04-02 16:09:01 -05:00
}