]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_const_eval/src/interpret/operand.rs
Rollup merge of #103439 - Nilstrieb:help-me-with-my-macro, r=estebank
[rust.git] / compiler / rustc_const_eval / src / interpret / operand.rs
index 0c212cf59e17fe1d5b2e26eccd8fa04699289a8c..f0a83b7a02689d4607e545b325e8a0ae803878e3 100644 (file)
@@ -4,7 +4,7 @@
 use rustc_hir::def::Namespace;
 use rustc_middle::ty::layout::{LayoutOf, PrimitiveExt, TyAndLayout};
 use rustc_middle::ty::print::{FmtPrinter, PrettyPrinter};
-use rustc_middle::ty::{ConstInt, DelaySpanBugEmitted, Ty};
+use rustc_middle::ty::{ConstInt, Ty};
 use rustc_middle::{mir, ty};
 use rustc_target::abi::{self, Abi, Align, HasDataLayout, Size, TagEncoding};
 use rustc_target::abi::{VariantIdx, Variants};
@@ -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,
@@ -567,7 +567,7 @@ pub fn const_to_op(
                     ty::ConstKind::Param(_) | ty::ConstKind::Placeholder(..) => {
                         throw_inval!(TooGeneric)
                     }
-                    ty::ConstKind::Error(DelaySpanBugEmitted { reported, .. }) => {
+                    ty::ConstKind::Error(reported) => {
                         throw_inval!(AlreadyReported(reported))
                     }
                     ty::ConstKind::Unevaluated(uv) => {