X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_const_eval%2Fsrc%2Finterpret%2Foperand.rs;h=f0a83b7a02689d4607e545b325e8a0ae803878e3;hb=1a6ed3050ff0ba96d0fa4e91fd657fe983623330;hp=dd00678aa0ceaf0dac275d7fa7f1a48147aa9a16;hpb=0aaad9e757207657064d70bf9e6c1e6eb327bf15;p=rust.git diff --git a/compiler/rustc_const_eval/src/interpret/operand.rs b/compiler/rustc_const_eval/src/interpret/operand.rs index dd00678aa0c..f0a83b7a026 100644 --- a/compiler/rustc_const_eval/src/interpret/operand.rs +++ b/compiler/rustc_const_eval/src/interpret/operand.rs @@ -280,7 +280,7 @@ pub fn offset( layout: TyAndLayout<'tcx>, cx: &impl HasDataLayout, ) -> InterpResult<'tcx, Self> { - assert!(!layout.is_unsized()); + assert!(layout.is_sized()); self.offset_with_meta(offset, MemPlaceMeta::None, layout, cx) } } @@ -376,7 +376,7 @@ pub fn read_immediate_raw( /// Read an immediate from a place, asserting that that is possible with the given layout. /// - /// If this suceeds, the `ImmTy` is never `Uninit`. + /// If this succeeds, the `ImmTy` is never `Uninit`. #[inline(always)] pub fn read_immediate( &self,