File tree 1 file changed +2
-5
lines changed
compiler/rustc_mir_build/src/build
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(
48
48
/// Construct the MIR for a given `DefId`.
49
49
fn mir_build ( tcx : TyCtxt < ' _ > , def : ty:: WithOptConstParam < LocalDefId > ) -> Body < ' _ > {
50
50
// 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.
54
51
match def {
55
52
ty:: WithOptConstParam { did, const_param_did : Some ( const_param_did) } => {
56
53
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) ) ;
58
55
}
59
56
ty:: WithOptConstParam { did, const_param_did : None } => {
60
57
tcx. ensure ( ) . thir_check_unsafety ( did) ;
61
- drop ( tcx. thir_abstract_const ( did) ) ;
58
+ tcx. ensure ( ) . thir_abstract_const ( did) ;
62
59
}
63
60
}
64
61
You can’t perform that action at this time.
0 commit comments