diff options
| author | bors <bors@rust-lang.org> | 2020-10-16 02:27:49 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-10-16 02:27:49 +0000 |
| commit | 9bd740a8f17d75168b683bcfb077b6e450047df5 (patch) | |
| tree | 3c2aeb9bdd39f11225d25994bd444c52cc2d9472 /src | |
| parent | b6e2dc6cdece6b498b876bc7e9377ff7d63d93e7 (diff) | |
| parent | db547520822eaa8cde18be0788cbad144c67b636 (diff) | |
| download | rust-9bd740a8f17d75168b683bcfb077b6e450047df5.tar.gz rust-9bd740a8f17d75168b683bcfb077b6e450047df5.zip | |
Auto merge of #77947 - tmiasko:promoted-scope, r=oli-obk
Create a single source scope for promoteds A promoted inherits all scopes from the parent body. At the same time, almost all statements and terminators inside the promoted body so far refer only to one of those scopes: the outermost one. Instead of inheriting all scopes, inherit only a single scope corresponding to the location of the promoted, making sure that there are no references to other scopes.
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/mir-opt/const_promotion_extern_static.FOO-promoted[0].ConstProp.after.mir | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/test/mir-opt/const_promotion_extern_static.FOO-promoted[0].ConstProp.after.mir b/src/test/mir-opt/const_promotion_extern_static.FOO-promoted[0].ConstProp.after.mir index d9c6b4f0029..0d5760b4cd5 100644 --- a/src/test/mir-opt/const_promotion_extern_static.FOO-promoted[0].ConstProp.after.mir +++ b/src/test/mir-opt/const_promotion_extern_static.FOO-promoted[0].ConstProp.after.mir @@ -5,8 +5,6 @@ promoted[0] in FOO: &[&i32; 1] = { let mut _1: [&i32; 1]; // in scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46 let mut _2: &i32; // in scope 0 at $DIR/const-promotion-extern-static.rs:13:32: 13:45 let mut _3: &i32; // in scope 0 at $DIR/const-promotion-extern-static.rs:13:42: 13:43 - scope 1 { - } bb0: { _3 = const {alloc2: &i32}; // scope 0 at $DIR/const-promotion-extern-static.rs:13:42: 13:43 |
