Skip to content

Commit d9c8a2b

Browse files
committed
use force to ensure const-qualif has been done, not read
1 parent 0d045d7 commit d9c8a2b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/librustc_mir/transform/qualify_consts.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -946,8 +946,9 @@ impl DefIdPass for QualifyAndPromoteConstants {
946946
// Ensure that we compute the `mir_const_qualif` for
947947
// constants at this point, before we do any further
948948
// optimization (and before we steal the previous
949-
// MIR).
950-
tcx.mir_const_qualif(mir_cx.def_id());
949+
// MIR). We don't directly need the result, so we can
950+
// just force it.
951+
ty::queries::mir_const_qualif::force(tcx, DUMMY_SP, mir_cx.def_id());
951952
mir_cx.steal_previous_mir()
952953
}
953954

0 commit comments

Comments
 (0)