@@ -228,7 +228,7 @@ pub(crate) fn const_eval_query(
228
228
}
229
229
GeneralConstId :: InTypeConstId ( c) => db. mir_body ( c. into ( ) ) ?,
230
230
} ;
231
- let c = interpret_mir ( db, & body, false ) . 0 ?;
231
+ let c = interpret_mir ( db, body, false ) . 0 ?;
232
232
Ok ( c)
233
233
}
234
234
@@ -241,7 +241,7 @@ pub(crate) fn const_eval_static_query(
241
241
Substitution :: empty ( Interner ) ,
242
242
db. trait_environment_for_body ( def. into ( ) ) ,
243
243
) ?;
244
- let c = interpret_mir ( db, & body, false ) . 0 ?;
244
+ let c = interpret_mir ( db, body, false ) . 0 ?;
245
245
Ok ( c)
246
246
}
247
247
@@ -268,7 +268,7 @@ pub(crate) fn const_eval_discriminant_variant(
268
268
Substitution :: empty ( Interner ) ,
269
269
db. trait_environment_for_body ( def) ,
270
270
) ?;
271
- let c = interpret_mir ( db, & mir_body, false ) . 0 ?;
271
+ let c = interpret_mir ( db, mir_body, false ) . 0 ?;
272
272
let c = try_const_usize ( db, & c) . unwrap ( ) as i128 ;
273
273
Ok ( c)
274
274
}
@@ -293,7 +293,7 @@ pub(crate) fn eval_to_const(
293
293
}
294
294
let infer = ctx. clone ( ) . resolve_all ( ) ;
295
295
if let Ok ( mir_body) = lower_to_mir ( ctx. db , ctx. owner , & ctx. body , & infer, expr) {
296
- if let Ok ( result) = interpret_mir ( db, & mir_body, true ) . 0 {
296
+ if let Ok ( result) = interpret_mir ( db, Arc :: new ( mir_body) , true ) . 0 {
297
297
return result;
298
298
}
299
299
}
0 commit comments