forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#78679 - oli-obk:temp_lifetime, r=eddyb
Also generate `StorageDead` in constants r? `@eddyb` None of this special casing is actually necessary since we started promoting within constants and statics. We may want to keep some of it around out of perf reasons, but it's not required for user visible behaviour somewhat related: rust-lang#68622
- Loading branch information
Showing
10 changed files
with
92 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/test/mir-opt/const_promotion_extern_static.BOP.mir_map.0.mir
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// MIR for `BOP` 0 mir_map | ||
|
||
static BOP: &i32 = { | ||
let mut _0: &i32; // return place in scope 0 at $DIR/const-promotion-extern-static.rs:16:13: 16:17 | ||
let _1: &i32; // in scope 0 at $DIR/const-promotion-extern-static.rs:16:20: 16:23 | ||
let _2: i32; // in scope 0 at $DIR/const-promotion-extern-static.rs:16:21: 16:23 | ||
|
||
bb0: { | ||
StorageLive(_1); // scope 0 at $DIR/const-promotion-extern-static.rs:16:20: 16:23 | ||
StorageLive(_2); // scope 0 at $DIR/const-promotion-extern-static.rs:16:21: 16:23 | ||
_2 = const 13_i32; // scope 0 at $DIR/const-promotion-extern-static.rs:16:21: 16:23 | ||
_1 = &_2; // scope 0 at $DIR/const-promotion-extern-static.rs:16:20: 16:23 | ||
_0 = &(*_1); // scope 0 at $DIR/const-promotion-extern-static.rs:16:20: 16:23 | ||
StorageDead(_1); // scope 0 at $DIR/const-promotion-extern-static.rs:16:22: 16:23 | ||
return; // scope 0 at $DIR/const-promotion-extern-static.rs:16:1: 16:24 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters