Skip to content

Commit

Permalink
use force to ensure const-qualif has been done, not read
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed May 2, 2017
1 parent 0d045d7 commit d9c8a2b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/librustc_mir/transform/qualify_consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down

0 comments on commit d9c8a2b

Please sign in to comment.