use force to ensure const-qualif has been done, not read
This commit is contained in:
parent
0d045d73a7
commit
d9c8a2b54b
1 changed files with 3 additions and 2 deletions
|
|
@ -946,8 +946,9 @@ impl DefIdPass for QualifyAndPromoteConstants {
|
|||
// 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()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue