@@ -228,7 +228,7 @@ pub(crate) fn const_eval_query(
228228 }
229229 GeneralConstId :: InTypeConstId ( c) => db. mir_body ( c. into ( ) ) ?,
230230 } ;
231- let c = interpret_mir ( db, & body, false ) . 0 ?;
231+ let c = interpret_mir ( db, body, false ) . 0 ?;
232232 Ok ( c)
233233}
234234
@@ -241,7 +241,7 @@ pub(crate) fn const_eval_static_query(
241241 Substitution :: empty ( Interner ) ,
242242 db. trait_environment_for_body ( def. into ( ) ) ,
243243 ) ?;
244- let c = interpret_mir ( db, & body, false ) . 0 ?;
244+ let c = interpret_mir ( db, body, false ) . 0 ?;
245245 Ok ( c)
246246}
247247
@@ -268,7 +268,7 @@ pub(crate) fn const_eval_discriminant_variant(
268268 Substitution :: empty ( Interner ) ,
269269 db. trait_environment_for_body ( def) ,
270270 ) ?;
271- let c = interpret_mir ( db, & mir_body, false ) . 0 ?;
271+ let c = interpret_mir ( db, mir_body, false ) . 0 ?;
272272 let c = try_const_usize ( db, & c) . unwrap ( ) as i128 ;
273273 Ok ( c)
274274}
@@ -293,7 +293,7 @@ pub(crate) fn eval_to_const(
293293 }
294294 let infer = ctx. clone ( ) . resolve_all ( ) ;
295295 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 {
297297 return result;
298298 }
299299 }
0 commit comments