Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace fragile erroneous const sys #70820

Merged
merged 11 commits into from
Apr 24, 2020
Prev Previous commit
Next Next commit
Adjust name of never typed const test
  • Loading branch information
spastorino committed Apr 23, 2020
commit da9aa2dd55b69a4c902af9b953904911e9cffb77
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Regression test for #66975 - ensure that we don't keep unevaluated
// `!`-typed constants until codegen.
// This was originally a regression test for #66975 - ensure that we do not generate never typed
// consts in codegen. We also have tests for this that catches the error, see
// src/test/ui/consts/const-eval/index-out-of-bounds-never-type.rs.

// Force generation of optimized mir for functions that do not reach codegen.
// compile-flags: --emit mir,link
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// MIR for `no_codegen` after PreCodegen

fn no_codegen() -> () {
let mut _0: (); // return place in scope 0 at $DIR/retain-never-const.rs:18:20: 18:20
let mut _0: (); // return place in scope 0 at $DIR/remove-never-const.rs:19:20: 19:20
scope 1 {
}

bb0: {
unreachable; // bb0[0]: scope 0 at $DIR/retain-never-const.rs:19:13: 19:33
unreachable; // bb0[0]: scope 0 at $DIR/remove-never-const.rs:20:13: 20:33
}
}