From 64d98f8ee037282c35007b64c2649055c56af1db Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:03 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/transmute/transmute-impl.rs | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 src/test/ui/transmute/transmute-impl.rs (limited to 'src/test/ui/transmute/transmute-impl.rs') diff --git a/src/test/ui/transmute/transmute-impl.rs b/src/test/ui/transmute/transmute-impl.rs deleted file mode 100644 index df422bda1..000000000 --- a/src/test/ui/transmute/transmute-impl.rs +++ /dev/null @@ -1,25 +0,0 @@ -// normalize-stderr-test "\d+ bits" -> "N bits" - -// Tests that are conservative around thin/fat pointer mismatches. - -#![allow(dead_code)] - -use std::mem::transmute; - -struct Foo { - t: Box -} - -impl Foo { - fn m(x: &T) -> &isize where T : Sized { - // OK here, because T : Sized is in scope. - unsafe { transmute(x) } - } - - fn n(x: &T) -> &isize { - // Not OK here, because T : Sized is not in scope. - unsafe { transmute(x) } //~ ERROR cannot transmute between types of different sizes - } -} - -fn main() { } -- cgit v1.2.3