mir building: fix some comments

This commit is contained in:
Ralf Jung 2020-08-16 10:44:53 +02:00
parent 4717cf2fcb
commit 75d13734bf
6 changed files with 7 additions and 6 deletions

View File

@ -321,6 +321,7 @@ fn mir_validated(
// Ensure that we compute the `mir_const_qualif` for constants at
// this point, before we steal the mir-const result.
// Also this means promotion can rely on all const checks having been done.
let _ = tcx.mir_const_qualif_opt_const_arg(def);
let mut body = tcx.mir_const(def).steal();
@ -336,7 +337,7 @@ fn mir_validated(
let promote: &[&dyn MirPass<'tcx>] = &[
// What we need to run borrowck etc.
&promote_pass,
&simplify::SimplifyCfg::new("qualify-consts"),
&simplify::SimplifyCfg::new("promote-consts"),
];
let opt_coverage: &[&dyn MirPass<'tcx>] = if tcx.sess.opts.debugging_opts.instrument_coverage {

View File

@ -14,7 +14,7 @@ trait Foo {
}
// EMIT_MIR_FOR_EACH_BIT_WIDTH
// EMIT_MIR issue_41697.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir
// EMIT_MIR issue_41697.{{impl}}-{{constant}}.SimplifyCfg-promote-consts.after.mir
impl Foo for [u8; 1+1] {
fn get(&self) -> [u8; 2] {
*self

View File

@ -1,4 +1,4 @@
// MIR for `<impl at $DIR/issue-41697.rs:18:1: 22:2>::{{constant}}#0` after SimplifyCfg-qualify-consts
// MIR for `<impl at $DIR/issue-41697.rs:18:1: 22:2>::{{constant}}#0` after SimplifyCfg-promote-consts
<impl at $DIR/issue-41697.rs:18:1: 22:2>::{{constant}}#0: usize = {
let mut _0: usize; // return place in scope 0 at $DIR/issue-41697.rs:18:19: 18:22

View File

@ -1,4 +1,4 @@
// MIR for `<impl at $DIR/issue-41697.rs:18:1: 22:2>::{{constant}}#0` after SimplifyCfg-qualify-consts
// MIR for `<impl at $DIR/issue-41697.rs:18:1: 22:2>::{{constant}}#0` after SimplifyCfg-promote-consts
<impl at $DIR/issue-41697.rs:18:1: 22:2>::{{constant}}#0: usize = {
let mut _0: usize; // return place in scope 0 at $DIR/issue-41697.rs:18:19: 18:22

View File

@ -1,4 +1,4 @@
// MIR for `main` after SimplifyCfg-qualify-consts
// MIR for `main` after SimplifyCfg-promote-consts
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/loop_test.rs:6:11: 6:11

View File

@ -2,7 +2,7 @@
// Tests to make sure we correctly generate falseUnwind edges in loops
// EMIT_MIR loop_test.main.SimplifyCfg-qualify-consts.after.mir
// EMIT_MIR loop_test.main.SimplifyCfg-promote-consts.after.mir
fn main() {
// Exit early at runtime. Since only care about the generated MIR
// and not the runtime behavior (which is exercised by other tests)