@@ -127,7 +127,7 @@ pub fn provide(providers: &mut Providers) {
127
127
cross_crate_inline:: provide ( providers) ;
128
128
providers. queries = query:: Providers {
129
129
mir_keys,
130
- mir_const ,
130
+ mir_built ,
131
131
mir_const_qualif,
132
132
mir_promoted,
133
133
mir_drops_elaborated_and_const_checked,
@@ -259,9 +259,9 @@ fn mir_const_qualif(tcx: TyCtxt<'_>, def: LocalDefId) -> ConstQualifs {
259
259
260
260
// N.B., this `borrow()` is guaranteed to be valid (i.e., the value
261
261
// cannot yet be stolen), because `mir_promoted()`, which steals
262
- // from `mir_const ()`, forces this query to execute before
262
+ // from `mir_built ()`, forces this query to execute before
263
263
// performing the steal.
264
- let body = & tcx. mir_const ( def) . borrow ( ) ;
264
+ let body = & tcx. mir_built ( def) . borrow ( ) ;
265
265
266
266
if body. return_ty ( ) . references_error ( ) {
267
267
// It's possible to reach here without an error being emitted (#121103).
@@ -282,7 +282,7 @@ fn mir_const_qualif(tcx: TyCtxt<'_>, def: LocalDefId) -> ConstQualifs {
282
282
/// Make MIR ready for const evaluation. This is run on all MIR, not just on consts!
283
283
/// FIXME(oli-obk): it's unclear whether we still need this phase (and its corresponding query).
284
284
/// We used to have this for pre-miri MIR based const eval.
285
- fn mir_const ( tcx : TyCtxt < ' _ > , def : LocalDefId ) -> & Steal < Body < ' _ > > {
285
+ fn mir_built ( tcx : TyCtxt < ' _ > , def : LocalDefId ) -> & Steal < Body < ' _ > > {
286
286
// MIR unsafety check uses the raw mir, so make sure it is run.
287
287
if !tcx. sess . opts . unstable_opts . thir_unsafeck {
288
288
tcx. ensure_with_value ( ) . mir_unsafety_check_result ( def) ;
@@ -338,7 +338,7 @@ fn mir_promoted(
338
338
} ;
339
339
// has_ffi_unwind_calls query uses the raw mir, so make sure it is run.
340
340
tcx. ensure_with_value ( ) . has_ffi_unwind_calls ( def) ;
341
- let mut body = tcx. mir_const ( def) . steal ( ) ;
341
+ let mut body = tcx. mir_built ( def) . steal ( ) ;
342
342
if let Some ( error_reported) = const_qualifs. tainted_by_errors {
343
343
body. tainted_by_errors = Some ( error_reported) ;
344
344
}
0 commit comments