rust/tests/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.mir

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

92 lines
3.7 KiB
Rust
Raw Normal View History

// MIR for `main::{closure#0}` 0 generator_drop
2020-06-20 03:19:19 +00:00
/* generator_layout = GeneratorLayout {
field_tys: {
2022-09-11 15:24:53 +00:00
_0: GeneratorSavedTy {
ty: std::string::String,
source_info: SourceInfo {
span: $DIR/generator_drop_cleanup.rs:11:13: 11:15 (#0),
scope: scope[0],
},
2023-01-21 14:26:44 +00:00
ignore_for_traits: false,
2022-09-11 15:24:53 +00:00
},
2020-06-20 03:19:19 +00:00
},
variant_fields: {
Unresumed(0): [],
Returned (1): [],
Panicked (2): [],
Suspend0 (3): [_0],
},
storage_conflicts: BitMatrix(1x1) {
(_0, _0),
},
} */
2020-04-02 21:09:01 +00:00
2022-11-02 21:54:49 +00:00
fn main::{closure#0}(_1: *mut [generator@$DIR/generator_drop_cleanup.rs:10:15: 10:17]) -> () {
let mut _0: (); // return place in scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
let mut _2: (); // in scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
let _3: std::string::String; // in scope 0 at $DIR/generator_drop_cleanup.rs:+1:13: +1:15
let _4: (); // in scope 0 at $DIR/generator_drop_cleanup.rs:+2:9: +2:14
let mut _5: (); // in scope 0 at $DIR/generator_drop_cleanup.rs:+2:9: +2:14
let mut _6: (); // in scope 0 at $DIR/generator_drop_cleanup.rs:+0:18: +0:18
let mut _7: (); // in scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
let mut _8: u32; // in scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
scope 1 {
2022-11-02 21:54:49 +00:00
debug _s => (((*_1) as variant#3).0: std::string::String); // in scope 1 at $DIR/generator_drop_cleanup.rs:+1:13: +1:15
}
2020-04-02 21:09:01 +00:00
bb0: {
2022-11-02 21:54:49 +00:00
_8 = discriminant((*_1)); // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
switchInt(move _8) -> [0: bb7, 3: bb10, otherwise: bb11]; // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
2020-04-02 21:09:01 +00:00
}
2020-10-02 20:11:24 +00:00
bb1: {
2022-11-02 21:54:49 +00:00
StorageDead(_5); // scope 1 at $DIR/generator_drop_cleanup.rs:+2:13: +2:14
StorageDead(_4); // scope 1 at $DIR/generator_drop_cleanup.rs:+2:14: +2:15
drop((((*_1) as variant#3).0: std::string::String)) -> [return: bb2, unwind: bb5]; // scope 0 at $DIR/generator_drop_cleanup.rs:+3:5: +3:6
2020-04-02 21:09:01 +00:00
}
2020-10-02 20:11:24 +00:00
bb2: {
2022-11-02 21:54:49 +00:00
nop; // scope 0 at $DIR/generator_drop_cleanup.rs:+3:5: +3:6
goto -> bb8; // scope 0 at $DIR/generator_drop_cleanup.rs:+3:5: +3:6
2020-04-02 21:09:01 +00:00
}
bb3: {
2022-11-02 21:54:49 +00:00
return; // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
2020-04-02 21:09:01 +00:00
}
2020-10-02 20:11:24 +00:00
bb4 (cleanup): {
2022-11-02 21:54:49 +00:00
resume; // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
2020-04-02 21:09:01 +00:00
}
2020-10-02 20:11:24 +00:00
bb5 (cleanup): {
2022-11-02 21:54:49 +00:00
nop; // scope 0 at $DIR/generator_drop_cleanup.rs:+3:5: +3:6
goto -> bb4; // scope 0 at $DIR/generator_drop_cleanup.rs:+3:5: +3:6
2020-04-02 21:09:01 +00:00
}
bb6: {
2022-11-02 21:54:49 +00:00
return; // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
2020-04-02 21:09:01 +00:00
}
bb7: {
2022-11-02 21:54:49 +00:00
goto -> bb9; // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
}
2020-10-02 20:11:24 +00:00
bb8: {
2022-11-02 21:54:49 +00:00
goto -> bb3; // scope 0 at $DIR/generator_drop_cleanup.rs:+3:5: +3:6
}
bb9: {
2022-11-02 21:54:49 +00:00
goto -> bb6; // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
}
2020-10-02 20:11:24 +00:00
bb10: {
2022-11-02 21:54:49 +00:00
StorageLive(_4); // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
StorageLive(_5); // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
goto -> bb1; // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
2020-04-02 21:09:01 +00:00
}
2020-10-02 20:11:24 +00:00
bb11: {
2022-11-02 21:54:49 +00:00
return; // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
2020-04-02 21:09:01 +00:00
}
}