diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-12-13 19:25:36 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-12-15 19:45:40 +0100 |
| commit | d48dbdc080f45f36ffc756de35c1443f2e05f527 (patch) | |
| tree | 5258ce40ce154feed6bf097ee2a370023cf915ef /src/test | |
| parent | 4a66a704b2c3d30ff07d89380ebb9ba3de3b3182 (diff) | |
| download | rust-d48dbdc080f45f36ffc756de35c1443f2e05f527.tar.gz rust-d48dbdc080f45f36ffc756de35c1443f2e05f527.zip | |
Move generator check earlier in inlining.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.mir | 15 | ||||
| -rw-r--r-- | src/test/ui/mir/remove-zsts-query-cycle.rs | 2 |
2 files changed, 6 insertions, 11 deletions
diff --git a/src/test/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.mir b/src/test/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.mir index d19229aabad..84ccf25ef75 100644 --- a/src/test/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.mir +++ b/src/test/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.mir @@ -20,21 +20,16 @@ fn main::{closure#0}(_1: *mut [generator@$DIR/generator-drop-cleanup.rs:10:15: 1 let _3: std::string::String; // in scope 0 at $DIR/generator-drop-cleanup.rs:11:13: 11:15 let _4: (); // in scope 0 at $DIR/generator-drop-cleanup.rs:12:9: 12:14 let mut _5: (); // in scope 0 at $DIR/generator-drop-cleanup.rs:12:9: 12:14 - let mut _7: (); // in scope 0 at $DIR/generator-drop-cleanup.rs:10:18: 10:18 - let mut _8: (); // in scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 - let mut _9: u32; // in scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 + let mut _6: (); // in scope 0 at $DIR/generator-drop-cleanup.rs:10:18: 10:18 + let mut _7: (); // in scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 + let mut _8: u32; // in scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 scope 1 { debug _s => (((*_1) as variant#3).0: std::string::String); // in scope 1 at $DIR/generator-drop-cleanup.rs:11:13: 11:15 } - scope 2 (inlined String::new) { // at $DIR/generator-drop-cleanup.rs:11:18: 11:31 - let mut _6: std::vec::Vec<u8>; // in scope 2 at $DIR/generator-drop-cleanup.rs:11:18: 11:31 - scope 3 (inlined Vec::<u8>::new) { // at $DIR/generator-drop-cleanup.rs:11:18: 11:31 - } - } bb0: { - _9 = discriminant((*_1)); // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 - switchInt(move _9) -> [0_u32: bb7, 3_u32: bb10, otherwise: bb11]; // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 + _8 = discriminant((*_1)); // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 + switchInt(move _8) -> [0_u32: bb7, 3_u32: bb10, otherwise: bb11]; // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 } bb1: { diff --git a/src/test/ui/mir/remove-zsts-query-cycle.rs b/src/test/ui/mir/remove-zsts-query-cycle.rs index 8f93c6cadff..be4d68f2de7 100644 --- a/src/test/ui/mir/remove-zsts-query-cycle.rs +++ b/src/test/ui/mir/remove-zsts-query-cycle.rs @@ -2,7 +2,7 @@ // optimized mir -> remove zsts -> layout of a generator -> optimized mir. // // edition:2018 -// compile-flags: --crate-type=lib +// compile-flags: --crate-type=lib -Zinline-mir=yes // build-pass pub async fn listen() -> Result<(), std::io::Error> { |
