File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
- // Regression test for #66975 - ensure that we don't keep unevaluated
2
- // `!`-typed constants until codegen.
1
+ // This was originally a regression test for #66975 - ensure that we do not generate never typed
2
+ // consts in codegen. We also have tests for this that catches the error, see
3
+ // src/test/ui/consts/const-eval/index-out-of-bounds-never-type.rs.
3
4
4
5
// Force generation of optimized mir for functions that do not reach codegen.
5
6
// compile-flags: --emit mir,link
Original file line number Diff line number Diff line change 1
1
// MIR for `no_codegen` after PreCodegen
2
2
3
3
fn no_codegen() -> () {
4
- let mut _0 : (); // return place in scope 0 at $DIR/retain -never-const.rs:18 :20: 18 :20
4
+ let mut _0 : (); // return place in scope 0 at $DIR/remove -never-const.rs:19 :20: 19 :20
5
5
scope 1 {
6
6
}
7
7
8
8
bb0 : {
9
- unreachable; // bb0[0] : scope 0 at $DIR/retain -never-const.rs:19 :13: 19 :33
9
+ unreachable; // bb0[0] : scope 0 at $DIR/remove -never-const.rs:20 :13: 20 :33
10
10
}
11
11
}
You can’t perform that action at this time.
0 commit comments