]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_mir/src/const_eval/error.rs
CTFE/Miri engine Pointer type overhaul: make Scalar-to-Pointer conversion infallible
[rust.git] / compiler / rustc_mir / src / const_eval / error.rs
index 17e8ab2a4da63ede2a11d7e048f74d1181dc5d72..5da1681662577648009f96b1da5b0aabfe02229d 100644 (file)
@@ -16,7 +16,6 @@
 #[derive(Clone, Debug)]
 pub enum ConstEvalErrKind {
     NeedsRfc(String),
-    PtrToIntCast,
     ConstAccessesStatic,
     ModifiedGlobal,
     AssertFailure(AssertKind<ConstInt>),
@@ -49,12 +48,6 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
             NeedsRfc(ref msg) => {
                 write!(f, "\"{}\" needs an rfc before being allowed inside constants", msg)
             }
-            PtrToIntCast => {
-                write!(
-                    f,
-                    "cannot cast pointer to integer because it was not created by cast from integer"
-                )
-            }
             ConstAccessesStatic => write!(f, "constant accesses static"),
             ModifiedGlobal => {
                 write!(f, "modifying a static's initial value from another static's initializer")