@@ -397,90 +397,90 @@ impl<'tcx, Tag: Provenance> Scalar<Tag> {
397397    /// Converts the scalar to produce an unsigned integer of the given size. 
398398/// Fails if the scalar is a pointer. 
399399#[ inline]  
400-     pub  fn  to_uint ( self ,  size :  Size )  -> InterpResult < ' static ,  u128 >  { 
400+     pub  fn  to_uint ( self ,  size :  Size )  -> InterpResult < ' tcx ,  u128 >  { 
401401        self . to_bits ( size) 
402402    } 
403403
404404    /// Converts the scalar to produce a `u8`. Fails if the scalar is a pointer. 
405- pub  fn  to_u8 ( self )  -> InterpResult < ' static ,  u8 >  { 
405+ pub  fn  to_u8 ( self )  -> InterpResult < ' tcx ,  u8 >  { 
406406        self . to_uint ( Size :: from_bits ( 8 ) ) . map ( |v| u8:: try_from ( v) . unwrap ( ) ) 
407407    } 
408408
409409    /// Converts the scalar to produce a `u16`. Fails if the scalar is a pointer. 
410- pub  fn  to_u16 ( self )  -> InterpResult < ' static ,  u16 >  { 
410+ pub  fn  to_u16 ( self )  -> InterpResult < ' tcx ,  u16 >  { 
411411        self . to_uint ( Size :: from_bits ( 16 ) ) . map ( |v| u16:: try_from ( v) . unwrap ( ) ) 
412412    } 
413413
414414    /// Converts the scalar to produce a `u32`. Fails if the scalar is a pointer. 
415- pub  fn  to_u32 ( self )  -> InterpResult < ' static ,  u32 >  { 
415+ pub  fn  to_u32 ( self )  -> InterpResult < ' tcx ,  u32 >  { 
416416        self . to_uint ( Size :: from_bits ( 32 ) ) . map ( |v| u32:: try_from ( v) . unwrap ( ) ) 
417417    } 
418418
419419    /// Converts the scalar to produce a `u64`. Fails if the scalar is a pointer. 
420- pub  fn  to_u64 ( self )  -> InterpResult < ' static ,  u64 >  { 
420+ pub  fn  to_u64 ( self )  -> InterpResult < ' tcx ,  u64 >  { 
421421        self . to_uint ( Size :: from_bits ( 64 ) ) . map ( |v| u64:: try_from ( v) . unwrap ( ) ) 
422422    } 
423423
424424    /// Converts the scalar to produce a `u128`. Fails if the scalar is a pointer. 
425- pub  fn  to_u128 ( self )  -> InterpResult < ' static ,  u128 >  { 
425+ pub  fn  to_u128 ( self )  -> InterpResult < ' tcx ,  u128 >  { 
426426        self . to_uint ( Size :: from_bits ( 128 ) ) 
427427    } 
428428
429429    /// Converts the scalar to produce a machine-pointer-sized unsigned integer. 
430430/// Fails if the scalar is a pointer. 
431- pub  fn  to_machine_usize ( self ,  cx :  & impl  HasDataLayout )  -> InterpResult < ' static ,  u64 >  { 
431+ pub  fn  to_machine_usize ( self ,  cx :  & impl  HasDataLayout )  -> InterpResult < ' tcx ,  u64 >  { 
432432        let  b = self . to_uint ( cx. data_layout ( ) . pointer_size ) ?; 
433433        Ok ( u64:: try_from ( b) . unwrap ( ) ) 
434434    } 
435435
436436    /// Converts the scalar to produce a signed integer of the given size. 
437437/// Fails if the scalar is a pointer. 
438438#[ inline]  
439-     pub  fn  to_int ( self ,  size :  Size )  -> InterpResult < ' static ,  i128 >  { 
439+     pub  fn  to_int ( self ,  size :  Size )  -> InterpResult < ' tcx ,  i128 >  { 
440440        let  b = self . to_bits ( size) ?; 
441441        Ok ( size. sign_extend ( b)  as  i128 ) 
442442    } 
443443
444444    /// Converts the scalar to produce an `i8`. Fails if the scalar is a pointer. 
445- pub  fn  to_i8 ( self )  -> InterpResult < ' static ,  i8 >  { 
445+ pub  fn  to_i8 ( self )  -> InterpResult < ' tcx ,  i8 >  { 
446446        self . to_int ( Size :: from_bits ( 8 ) ) . map ( |v| i8:: try_from ( v) . unwrap ( ) ) 
447447    } 
448448
449449    /// Converts the scalar to produce an `i16`. Fails if the scalar is a pointer. 
450- pub  fn  to_i16 ( self )  -> InterpResult < ' static ,  i16 >  { 
450+ pub  fn  to_i16 ( self )  -> InterpResult < ' tcx ,  i16 >  { 
451451        self . to_int ( Size :: from_bits ( 16 ) ) . map ( |v| i16:: try_from ( v) . unwrap ( ) ) 
452452    } 
453453
454454    /// Converts the scalar to produce an `i32`. Fails if the scalar is a pointer. 
455- pub  fn  to_i32 ( self )  -> InterpResult < ' static ,  i32 >  { 
455+ pub  fn  to_i32 ( self )  -> InterpResult < ' tcx ,  i32 >  { 
456456        self . to_int ( Size :: from_bits ( 32 ) ) . map ( |v| i32:: try_from ( v) . unwrap ( ) ) 
457457    } 
458458
459459    /// Converts the scalar to produce an `i64`. Fails if the scalar is a pointer. 
460- pub  fn  to_i64 ( self )  -> InterpResult < ' static ,  i64 >  { 
460+ pub  fn  to_i64 ( self )  -> InterpResult < ' tcx ,  i64 >  { 
461461        self . to_int ( Size :: from_bits ( 64 ) ) . map ( |v| i64:: try_from ( v) . unwrap ( ) ) 
462462    } 
463463
464464    /// Converts the scalar to produce an `i128`. Fails if the scalar is a pointer. 
465- pub  fn  to_i128 ( self )  -> InterpResult < ' static ,  i128 >  { 
465+ pub  fn  to_i128 ( self )  -> InterpResult < ' tcx ,  i128 >  { 
466466        self . to_int ( Size :: from_bits ( 128 ) ) 
467467    } 
468468
469469    /// Converts the scalar to produce a machine-pointer-sized signed integer. 
470470/// Fails if the scalar is a pointer. 
471- pub  fn  to_machine_isize ( self ,  cx :  & impl  HasDataLayout )  -> InterpResult < ' static ,  i64 >  { 
471+ pub  fn  to_machine_isize ( self ,  cx :  & impl  HasDataLayout )  -> InterpResult < ' tcx ,  i64 >  { 
472472        let  b = self . to_int ( cx. data_layout ( ) . pointer_size ) ?; 
473473        Ok ( i64:: try_from ( b) . unwrap ( ) ) 
474474    } 
475475
476476    #[ inline]  
477-     pub  fn  to_f32 ( self )  -> InterpResult < ' static ,  Single >  { 
477+     pub  fn  to_f32 ( self )  -> InterpResult < ' tcx ,  Single >  { 
478478        // Going through `u32` to check size and truncation. 
479479        Ok ( Single :: from_bits ( self . to_u32 ( ) ?. into ( ) ) ) 
480480    } 
481481
482482    #[ inline]  
483-     pub  fn  to_f64 ( self )  -> InterpResult < ' static ,  Double >  { 
483+     pub  fn  to_f64 ( self )  -> InterpResult < ' tcx ,  Double >  { 
484484        // Going through `u64` to check size and truncation. 
485485        Ok ( Double :: from_bits ( self . to_u64 ( ) ?. into ( ) ) ) 
486486    } 
@@ -534,7 +534,7 @@ impl<Tag> ScalarMaybeUninit<Tag> {
534534    } 
535535
536536    #[ inline]  
537-     pub  fn  check_init ( self )  -> InterpResult < ' static ,  Scalar < Tag > >  { 
537+     pub  fn  check_init < ' tcx > ( self )  -> InterpResult < ' tcx ,  Scalar < Tag > >  { 
538538        match  self  { 
539539            ScalarMaybeUninit :: Scalar ( scalar)  => Ok ( scalar) , 
540540            ScalarMaybeUninit :: Uninit  => throw_ub ! ( InvalidUninitBytes ( None ) ) , 
0 commit comments