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

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

92 lines
1.7 KiB
Rust
Raw Normal View History

// MIR for `main::{closure#0}` 0 generator_drop
2020-06-19 22:19:19 -05:00
/* generator_layout = GeneratorLayout {
field_tys: {
2022-09-11 10:24:53 -05: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 08:26:44 -06:00
ignore_for_traits: false,
2022-09-11 10:24:53 -05:00
},
2020-06-19 22:19:19 -05:00
},
variant_fields: {
Unresumed(0): [],
Returned (1): [],
Panicked (2): [],
Suspend0 (3): [_0],
},
storage_conflicts: BitMatrix(1x1) {
(_0, _0),
},
} */
2020-04-02 16:09:01 -05:00
2022-11-02 16:54:49 -05:00
fn main::{closure#0}(_1: *mut [generator@$DIR/generator_drop_cleanup.rs:10:15: 10:17]) -> () {
2023-06-06 08:47:00 -05:00
let mut _0: ();
let mut _2: ();
let _3: std::string::String;
let _4: ();
let mut _5: ();
let mut _6: ();
let mut _7: ();
let mut _8: u32;
scope 1 {
2023-06-06 08:47:00 -05:00
debug _s => (((*_1) as variant#3).0: std::string::String);
}
2020-04-02 16:09:01 -05:00
bb0: {
2023-06-06 08:47:00 -05:00
_8 = discriminant((*_1));
switchInt(move _8) -> [0: bb7, 3: bb10, otherwise: bb11];
2020-04-02 16:09:01 -05:00
}
2020-10-02 15:11:24 -05:00
bb1: {
2023-06-06 08:47:00 -05:00
StorageDead(_5);
StorageDead(_4);
drop((((*_1) as variant#3).0: std::string::String)) -> [return: bb2, unwind: bb5];
2020-04-02 16:09:01 -05:00
}
2020-10-02 15:11:24 -05:00
bb2: {
2023-06-06 08:47:00 -05:00
nop;
goto -> bb8;
2020-04-02 16:09:01 -05:00
}
bb3: {
2023-06-06 08:47:00 -05:00
return;
2020-04-02 16:09:01 -05:00
}
2020-10-02 15:11:24 -05:00
bb4 (cleanup): {
2023-06-06 08:47:00 -05:00
resume;
2020-04-02 16:09:01 -05:00
}
2020-10-02 15:11:24 -05:00
bb5 (cleanup): {
2023-06-06 08:47:00 -05:00
nop;
goto -> bb4;
2020-04-02 16:09:01 -05:00
}
bb6: {
2023-06-06 08:47:00 -05:00
return;
2020-04-02 16:09:01 -05:00
}
bb7: {
2023-06-06 08:47:00 -05:00
goto -> bb9;
}
2020-10-02 15:11:24 -05:00
bb8: {
2023-06-06 08:47:00 -05:00
goto -> bb3;
}
bb9: {
2023-06-06 08:47:00 -05:00
goto -> bb6;
}
2020-10-02 15:11:24 -05:00
bb10: {
2023-06-06 08:47:00 -05:00
StorageLive(_4);
StorageLive(_5);
goto -> bb1;
2020-04-02 16:09:01 -05:00
}
2020-10-02 15:11:24 -05:00
bb11: {
2023-06-06 08:47:00 -05:00
return;
2020-04-02 16:09:01 -05:00
}
}