From dc0db358abe19481e475e10c32149b53370f1a1c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 05:57:31 +0200 Subject: Merging upstream version 1.72.1+dfsg1. Signed-off-by: Daniel Baumann --- tests/mir-opt/issue_72181.main.built.after.mir | 77 +++++++++++++------------- 1 file changed, 37 insertions(+), 40 deletions(-) (limited to 'tests/mir-opt/issue_72181.main.built.after.mir') diff --git a/tests/mir-opt/issue_72181.main.built.after.mir b/tests/mir-opt/issue_72181.main.built.after.mir index 724e55e17..4e4071536 100644 --- a/tests/mir-opt/issue_72181.main.built.after.mir +++ b/tests/mir-opt/issue_72181.main.built.after.mir @@ -1,18 +1,18 @@ // MIR for `main` after built fn main() -> () { - let mut _0: (); // return place in scope 0 at $DIR/issue_72181.rs:+0:11: +0:11 - let mut _1: usize; // in scope 0 at $DIR/issue_72181.rs:+1:13: +1:34 - let mut _3: Foo; // in scope 0 at $DIR/issue_72181.rs:+3:14: +3:27 - let mut _4: Foo; // in scope 0 at $DIR/issue_72181.rs:+3:29: +3:42 - let mut _5: u64; // in scope 0 at $DIR/issue_72181.rs:+4:13: +4:30 - let _6: usize; // in scope 0 at $DIR/issue_72181.rs:+4:24: +4:25 - let mut _7: usize; // in scope 0 at $DIR/issue_72181.rs:+4:22: +4:26 - let mut _8: bool; // in scope 0 at $DIR/issue_72181.rs:+4:22: +4:26 + let mut _0: (); + let mut _1: usize; + let mut _3: Foo; + let mut _4: Foo; + let mut _5: u64; + let _6: usize; + let mut _7: usize; + let mut _8: bool; scope 1 { - let _2: [Foo; 2]; // in scope 1 at $DIR/issue_72181.rs:+3:9: +3:10 + let _2: [Foo; 2]; scope 2 { - debug f => _2; // in scope 2 at $DIR/issue_72181.rs:+3:9: +3:10 + debug f => _2; scope 3 { } scope 4 { @@ -21,44 +21,41 @@ fn main() -> () { } bb0: { - StorageLive(_1); // scope 0 at $DIR/issue_72181.rs:+1:13: +1:34 - _1 = std::mem::size_of::() -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/issue_72181.rs:+1:13: +1:34 - // mir::Constant - // + span: $DIR/issue_72181.rs:24:13: 24:32 - // + literal: Const { ty: fn() -> usize {std::mem::size_of::}, val: Value() } + StorageLive(_1); + _1 = std::mem::size_of::() -> [return: bb1, unwind: bb3]; } bb1: { - PlaceMention(_1); // scope 0 at $DIR/issue_72181.rs:+1:13: +1:34 - StorageDead(_1); // scope 0 at $DIR/issue_72181.rs:+1:34: +1:35 - StorageLive(_2); // scope 1 at $DIR/issue_72181.rs:+3:9: +3:10 - StorageLive(_3); // scope 1 at $DIR/issue_72181.rs:+3:14: +3:27 - _3 = Foo { a: const 42_u64 }; // scope 1 at $DIR/issue_72181.rs:+3:14: +3:27 - StorageLive(_4); // scope 1 at $DIR/issue_72181.rs:+3:29: +3:42 - _4 = Foo { a: const 10_u64 }; // scope 1 at $DIR/issue_72181.rs:+3:29: +3:42 - _2 = [move _3, move _4]; // scope 1 at $DIR/issue_72181.rs:+3:13: +3:43 - StorageDead(_4); // scope 1 at $DIR/issue_72181.rs:+3:42: +3:43 - StorageDead(_3); // scope 1 at $DIR/issue_72181.rs:+3:42: +3:43 - FakeRead(ForLet(None), _2); // scope 1 at $DIR/issue_72181.rs:+3:9: +3:10 - StorageLive(_5); // scope 2 at $DIR/issue_72181.rs:+4:13: +4:30 - StorageLive(_6); // scope 4 at $DIR/issue_72181.rs:+4:24: +4:25 - _6 = const 0_usize; // scope 4 at $DIR/issue_72181.rs:+4:24: +4:25 - _7 = Len(_2); // scope 4 at $DIR/issue_72181.rs:+4:22: +4:26 - _8 = Lt(_6, _7); // scope 4 at $DIR/issue_72181.rs:+4:22: +4:26 - assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> [success: bb2, unwind: bb3]; // scope 4 at $DIR/issue_72181.rs:+4:22: +4:26 + PlaceMention(_1); + StorageDead(_1); + StorageLive(_2); + StorageLive(_3); + _3 = Foo { a: const 42_u64 }; + StorageLive(_4); + _4 = Foo { a: const 10_u64 }; + _2 = [move _3, move _4]; + StorageDead(_4); + StorageDead(_3); + FakeRead(ForLet(None), _2); + StorageLive(_5); + StorageLive(_6); + _6 = const 0_usize; + _7 = Len(_2); + _8 = Lt(_6, _7); + assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> [success: bb2, unwind: bb3]; } bb2: { - _5 = (_2[_6].0: u64); // scope 4 at $DIR/issue_72181.rs:+4:22: +4:28 - PlaceMention(_5); // scope 2 at $DIR/issue_72181.rs:+4:13: +4:30 - StorageDead(_6); // scope 2 at $DIR/issue_72181.rs:+4:30: +4:31 - StorageDead(_5); // scope 2 at $DIR/issue_72181.rs:+4:30: +4:31 - _0 = const (); // scope 0 at $DIR/issue_72181.rs:+0:11: +5:2 - StorageDead(_2); // scope 1 at $DIR/issue_72181.rs:+5:1: +5:2 - return; // scope 0 at $DIR/issue_72181.rs:+5:2: +5:2 + _5 = (_2[_6].0: u64); + PlaceMention(_5); + StorageDead(_6); + StorageDead(_5); + _0 = const (); + StorageDead(_2); + return; } bb3 (cleanup): { - resume; // scope 0 at $DIR/issue_72181.rs:+0:1: +5:2 + resume; } } -- cgit v1.2.3