File tree Expand file tree Collapse file tree 5 files changed +18
-22
lines changed Expand file tree Collapse file tree 5 files changed +18
-22
lines changed Original file line number Diff line number Diff line change 1- // ignore-emscripten
21// compile-flags: -C no-prepopulate-passes -Copt-level=0
32
43// Test that tuples get optimized layout, in particular with a ZST in the last field (#63244)
Original file line number Diff line number Diff line change 11// unit-test: ConstProp
22// compile-flags: -O
3- // ignore-emscripten compiled with panic=abort by default
43// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
5- // ignore-wasm64
64
75#![ feature( rustc_attrs, stmt_expr_attributes) ]
86
Original file line number Diff line number Diff line change 11// MIR for `outer` after PreCodegen
22
33fn outer(_1 : u8) -> u8 {
4- debug v => _1; // in scope 0 at $DIR/spans.rs:10 :14 : 10 :15
5- let mut _0 : u8; // return place in scope 0 at $DIR/spans.rs:10 :24: 10 :26
6- let mut _2 : &u8; // in scope 0 at $DIR/spans.rs:11 :11: 11 :13
4+ debug v => _1; // in scope 0 at $DIR/spans.rs:9 :14 : 9 :15
5+ let mut _0 : u8; // return place in scope 0 at $DIR/spans.rs:9 :24: 9 :26
6+ let mut _2 : &u8; // in scope 0 at $DIR/spans.rs:10 :11: 10 :13
77
88 bb0 : {
9- StorageLive(_2); // scope 0 at $DIR/spans.rs:11 :11 : 11 :13
10- _2 = &_1; // scope 0 at $DIR/spans.rs:11 :11 : 11 :13
11- _0 = inner(move _2) -> [return : bb1, unwind unreachable]; // scope 0 at $DIR/spans.rs:11 :5: 11 :14
9+ StorageLive(_2); // scope 0 at $DIR/spans.rs:10 :11 : 10 :13
10+ _2 = &_1; // scope 0 at $DIR/spans.rs:10 :11 : 10 :13
11+ _0 = inner(move _2) -> [return : bb1, unwind unreachable]; // scope 0 at $DIR/spans.rs:10 :5: 10 :14
1212 // mir::Constant
13- // + span : $DIR/spans.rs:11 :5: 11 :10
13+ // + span : $DIR/spans.rs:10 :5: 10 :10
1414 // + literal : Const { ty: for<'a> fn(&'a u8) -> u8 {inner}, val: Value(<ZST>) }
1515 }
1616
1717 bb1 : {
18- StorageDead(_2); // scope 0 at $DIR/spans.rs:11 :13 : 11 :14
19- return; // scope 0 at $DIR/spans.rs:12 :2 : 12 :2
18+ StorageDead(_2); // scope 0 at $DIR/spans.rs:10 :13 : 10 :14
19+ return; // scope 0 at $DIR/spans.rs:11 :2 : 11 :2
2020 }
2121}
Original file line number Diff line number Diff line change 11// MIR for `outer` after PreCodegen
22
33fn outer(_1 : u8) -> u8 {
4- debug v => _1; // in scope 0 at $DIR/spans.rs:10 :14 : 10 :15
5- let mut _0 : u8; // return place in scope 0 at $DIR/spans.rs:10 :24: 10 :26
6- let mut _2 : &u8; // in scope 0 at $DIR/spans.rs:11 :11: 11 :13
4+ debug v => _1; // in scope 0 at $DIR/spans.rs:9 :14 : 9 :15
5+ let mut _0 : u8; // return place in scope 0 at $DIR/spans.rs:9 :24: 9 :26
6+ let mut _2 : &u8; // in scope 0 at $DIR/spans.rs:10 :11: 10 :13
77
88 bb0 : {
9- StorageLive(_2); // scope 0 at $DIR/spans.rs:11 :11 : 11 :13
10- _2 = &_1; // scope 0 at $DIR/spans.rs:11 :11 : 11 :13
11- _0 = inner(move _2) -> [return : bb1, unwind continue]; // scope 0 at $DIR/spans.rs:11 :5: 11 :14
9+ StorageLive(_2); // scope 0 at $DIR/spans.rs:10 :11 : 10 :13
10+ _2 = &_1; // scope 0 at $DIR/spans.rs:10 :11 : 10 :13
11+ _0 = inner(move _2) -> [return : bb1, unwind continue]; // scope 0 at $DIR/spans.rs:10 :5: 10 :14
1212 // mir::Constant
13- // + span : $DIR/spans.rs:11 :5: 11 :10
13+ // + span : $DIR/spans.rs:10 :5: 10 :10
1414 // + literal : Const { ty: for<'a> fn(&'a u8) -> u8 {inner}, val: Value(<ZST>) }
1515 }
1616
1717 bb1 : {
18- StorageDead(_2); // scope 0 at $DIR/spans.rs:11 :13 : 11 :14
19- return; // scope 0 at $DIR/spans.rs:12 :2 : 12 :2
18+ StorageDead(_2); // scope 0 at $DIR/spans.rs:10 :13 : 10 :14
19+ return; // scope 0 at $DIR/spans.rs:11 :2 : 11 :2
2020 }
2121}
Original file line number Diff line number Diff line change 22//
33// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
44// compile-flags: -Zmir-include-spans
5- // ignore-wasm32
65
76#![ crate_type = "lib" ]
87
You can’t perform that action at this time.
0 commit comments