@@ -376,27 +376,27 @@ impl<'tcx, Tag: Provenance> Scalar<Tag> {
376
376
self . to_bits ( sz)
377
377
}
378
378
379
- /// Converts the scalar to produce an `u8`. Fails if the scalar is a pointer.
379
+ /// Converts the scalar to produce a `u8`. Fails if the scalar is a pointer.
380
380
pub fn to_u8 ( self ) -> InterpResult < ' static , u8 > {
381
381
self . to_unsigned_with_bit_width ( 8 ) . map ( |v| u8:: try_from ( v) . unwrap ( ) )
382
382
}
383
383
384
- /// Converts the scalar to produce an `u16`. Fails if the scalar is a pointer.
384
+ /// Converts the scalar to produce a `u16`. Fails if the scalar is a pointer.
385
385
pub fn to_u16 ( self ) -> InterpResult < ' static , u16 > {
386
386
self . to_unsigned_with_bit_width ( 16 ) . map ( |v| u16:: try_from ( v) . unwrap ( ) )
387
387
}
388
388
389
- /// Converts the scalar to produce an `u32`. Fails if the scalar is a pointer.
389
+ /// Converts the scalar to produce a `u32`. Fails if the scalar is a pointer.
390
390
pub fn to_u32 ( self ) -> InterpResult < ' static , u32 > {
391
391
self . to_unsigned_with_bit_width ( 32 ) . map ( |v| u32:: try_from ( v) . unwrap ( ) )
392
392
}
393
393
394
- /// Converts the scalar to produce an `u64`. Fails if the scalar is a pointer.
394
+ /// Converts the scalar to produce a `u64`. Fails if the scalar is a pointer.
395
395
pub fn to_u64 ( self ) -> InterpResult < ' static , u64 > {
396
396
self . to_unsigned_with_bit_width ( 64 ) . map ( |v| u64:: try_from ( v) . unwrap ( ) )
397
397
}
398
398
399
- /// Converts the scalar to produce an `u128`. Fails if the scalar is a pointer.
399
+ /// Converts the scalar to produce a `u128`. Fails if the scalar is a pointer.
400
400
pub fn to_u128 ( self ) -> InterpResult < ' static , u128 > {
401
401
self . to_unsigned_with_bit_width ( 128 )
402
402
}
0 commit comments