]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/generator-drop-cleanup.rs
Rollup merge of #61116 - scottmcm:vcpp-download-link, r=alexcrichton
[rust.git] / src / test / mir-opt / generator-drop-cleanup.rs
1 #![feature(generators, generator_trait)]
2
3 // Regression test for #58892, generator drop shims should not have blocks
4 // spuriously marked as cleanup
5
6 fn main() {
7     let gen = || {
8         yield;
9     };
10 }
11
12 // END RUST SOURCE
13
14 // START rustc.main-{{closure}}.generator_drop.0.mir
15 // bb0: {
16 //     _5 = discriminant((*_1));
17 //     switchInt(move _5) -> [0u32: bb4, 3u32: bb7, otherwise: bb8];
18 // }
19 // bb1: {
20 //     StorageDead(_3);
21 //     goto -> bb5;
22 // }
23 // bb2: {
24 //     return;
25 // }
26 // bb3: {
27 //     return;
28 // }
29 // bb4: {
30 //     goto -> bb6;
31 // }
32 // bb5: {
33 //     goto -> bb2;
34 // }
35 // bb6: {
36 //     goto -> bb3;
37 // }
38 // bb7: {
39 //     StorageLive(_3);
40 //     goto -> bb1;
41 // }
42 // bb8: {
43 //     return;
44 // }
45 // END rustc.main-{{closure}}.generator_drop.0.mir