about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc_mir/interpret/place.rs2
-rw-r--r--src/test/ui/consts/transmute-size-mismatch-before-typeck.stderr108
2 files changed, 1 insertions, 109 deletions
diff --git a/src/librustc_mir/interpret/place.rs b/src/librustc_mir/interpret/place.rs
index b384de571fa..f4ac7de852a 100644
--- a/src/librustc_mir/interpret/place.rs
+++ b/src/librustc_mir/interpret/place.rs
@@ -928,7 +928,7 @@ where
             // array length computation, `typeck` may not have yet been run and errored out. In fact
             // most likey we *are* running `typeck` right now. Investigate whether we can bail out
             // on `typeck_tables().has_errors` at all const eval entry points.
-            error!("Size mismatch when transmuting!\nsrc: {:#?}\ndest: {:#?}", src, dest);
+            debug!("Size mismatch when transmuting!\nsrc: {:#?}\ndest: {:#?}", src, dest);
             throw_unsup!(TransmuteSizeDiff(src.layout.ty, dest.layout.ty));
         }
         // Unsized copies rely on interpreting `src.meta` with `dest.layout`, we want
diff --git a/src/test/ui/consts/transmute-size-mismatch-before-typeck.stderr b/src/test/ui/consts/transmute-size-mismatch-before-typeck.stderr
index 29aeb428987..74de5dc9aaf 100644
--- a/src/test/ui/consts/transmute-size-mismatch-before-typeck.stderr
+++ b/src/test/ui/consts/transmute-size-mismatch-before-typeck.stderr
@@ -1,111 +1,3 @@
-[ERROR rustc_mir::interpret::place] Size mismatch when transmuting!
-    src: OpTy {
-        op: Immediate(
-            Scalar(
-                0x0000000000000001,
-            ),
-        ),
-        layout: TyLayout {
-            ty: usize,
-            details: LayoutDetails {
-                variants: Single {
-                    index: 0,
-                },
-                fields: Union(
-                    0,
-                ),
-                abi: Scalar(
-                    Scalar {
-                        value: Int(
-                            I64,
-                            false,
-                        ),
-                        valid_range: 0..=18446744073709551615,
-                    },
-                ),
-                largest_niche: None,
-                align: AbiAndPrefAlign {
-                    abi: Align {
-                        pow2: 3,
-                    },
-                    pref: Align {
-                        pow2: 3,
-                    },
-                },
-                size: Size {
-                    raw: 8,
-                },
-            },
-        },
-    }
-    dest: PlaceTy {
-        place: Ptr(
-            MemPlace {
-                ptr: AllocId(0).0x0,
-                align: Align {
-                    pow2: 3,
-                },
-                meta: None,
-            },
-        ),
-        layout: TyLayout {
-            ty: &[u8],
-            details: LayoutDetails {
-                variants: Single {
-                    index: 0,
-                },
-                fields: Arbitrary {
-                    offsets: [
-                        Size {
-                            raw: 0,
-                        },
-                        Size {
-                            raw: 8,
-                        },
-                    ],
-                    memory_index: [
-                        0,
-                        1,
-                    ],
-                },
-                abi: ScalarPair(
-                    Scalar {
-                        value: Pointer,
-                        valid_range: 1..=18446744073709551615,
-                    },
-                    Scalar {
-                        value: Int(
-                            I64,
-                            false,
-                        ),
-                        valid_range: 0..=18446744073709551615,
-                    },
-                ),
-                largest_niche: Some(
-                    Niche {
-                        offset: Size {
-                            raw: 0,
-                        },
-                        scalar: Scalar {
-                            value: Pointer,
-                            valid_range: 1..=18446744073709551615,
-                        },
-                    },
-                ),
-                align: AbiAndPrefAlign {
-                    abi: Align {
-                        pow2: 3,
-                    },
-                    pref: Align {
-                        pow2: 3,
-                    },
-                },
-                size: Size {
-                    raw: 16,
-                },
-            },
-        },
-    }
 error: any use of this value will cause an error
   --> $DIR/transmute-size-mismatch-before-typeck.rs:10:29
    |