File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
compiler/rustc_mir_build/src/build Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -48,17 +48,14 @@ pub(crate) fn mir_built(
4848/// Construct the MIR for a given `DefId`.
4949fn mir_build ( tcx : TyCtxt < ' _ > , def : ty:: WithOptConstParam < LocalDefId > ) -> Body < ' _ > {
5050 // Ensure unsafeck and abstract const building is ran before we steal the THIR.
51- // We can't use `ensure()` for `thir_abstract_const` as it doesn't compute the query
52- // if inputs are green. This can cause ICEs when calling `thir_abstract_const` after
53- // THIR has been stolen if we haven't computed this query yet.
5451 match def {
5552 ty:: WithOptConstParam { did, const_param_did : Some ( const_param_did) } => {
5653 tcx. ensure ( ) . thir_check_unsafety_for_const_arg ( ( did, const_param_did) ) ;
57- drop ( tcx. thir_abstract_const_of_const_arg ( ( did, const_param_did) ) ) ;
54+ tcx. ensure ( ) . thir_abstract_const_of_const_arg ( ( did, const_param_did) ) ;
5855 }
5956 ty:: WithOptConstParam { did, const_param_did : None } => {
6057 tcx. ensure ( ) . thir_check_unsafety ( did) ;
61- drop ( tcx. thir_abstract_const ( did) ) ;
58+ tcx. ensure ( ) . thir_abstract_const ( did) ;
6259 }
6360 }
6461
You can’t perform that action at this time.
0 commit comments