File tree 5 files changed +18
-22
lines changed
5 files changed +18
-22
lines changed Original file line number Diff line number Diff line change 1
- // ignore-emscripten
2
1
// compile-flags: -C no-prepopulate-passes -Copt-level=0
3
2
4
3
// 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 1
1
// unit-test: ConstProp
2
2
// compile-flags: -O
3
- // ignore-emscripten compiled with panic=abort by default
4
3
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
5
- // ignore-wasm64
6
4
7
5
#![ feature( rustc_attrs, stmt_expr_attributes) ]
8
6
Original file line number Diff line number Diff line change 1
1
// MIR for `outer` after PreCodegen
2
2
3
3
fn 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
7
7
8
8
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
12
12
// mir::Constant
13
- // + span : $DIR/spans.rs:11 :5: 11 :10
13
+ // + span : $DIR/spans.rs:10 :5: 10 :10
14
14
// + literal : Const { ty: for<'a> fn(&'a u8) -> u8 {inner}, val: Value(<ZST>) }
15
15
}
16
16
17
17
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
20
20
}
21
21
}
Original file line number Diff line number Diff line change 1
1
// MIR for `outer` after PreCodegen
2
2
3
3
fn 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
7
7
8
8
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
12
12
// mir::Constant
13
- // + span : $DIR/spans.rs:11 :5: 11 :10
13
+ // + span : $DIR/spans.rs:10 :5: 10 :10
14
14
// + literal : Const { ty: for<'a> fn(&'a u8) -> u8 {inner}, val: Value(<ZST>) }
15
15
}
16
16
17
17
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
20
20
}
21
21
}
Original file line number Diff line number Diff line change 2
2
//
3
3
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
4
4
// compile-flags: -Zmir-include-spans
5
- // ignore-wasm32
6
5
7
6
#![ crate_type = "lib" ]
8
7
You can’t perform that action at this time.
0 commit comments