mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
use force to ensure const-qualif has been done, not read
This commit is contained in:
@@ -946,8 +946,9 @@ fn run_pass<'a, 'tcx: 'a>(&self, mir_cx: &MirCtxt<'a, 'tcx>) -> Mir<'tcx> {
|
||||
// Ensure that we compute the `mir_const_qualif` for
|
||||
// constants at this point, before we do any further
|
||||
// optimization (and before we steal the previous
|
||||
// MIR).
|
||||
tcx.mir_const_qualif(mir_cx.def_id());
|
||||
// MIR). We don't directly need the result, so we can
|
||||
// just force it.
|
||||
ty::queries::mir_const_qualif::force(tcx, DUMMY_SP, mir_cx.def_id());
|
||||
mir_cx.steal_previous_mir()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user