diff options
Diffstat (limited to 'src/test/ui/packed/issue-46152.rs')
-rw-r--r-- | src/test/ui/packed/issue-46152.rs | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/test/ui/packed/issue-46152.rs b/src/test/ui/packed/issue-46152.rs deleted file mode 100644 index fb1c9fb78..000000000 --- a/src/test/ui/packed/issue-46152.rs +++ /dev/null @@ -1,24 +0,0 @@ -// run-pass -#![allow(dead_code)] -#![allow(unused_variables)] -#![feature(unsize, coerce_unsized)] - -#[repr(packed)] -struct UnalignedPtr<'a, T: ?Sized> - where T: 'a, -{ - data: &'a T, -} - -fn main() { - - impl<'a, T, U> std::ops::CoerceUnsized<UnalignedPtr<'a, U>> for UnalignedPtr<'a, T> - where - T: std::marker::Unsize<U> + ?Sized, - U: ?Sized, - { } - - let arr = [1, 2, 3]; - let arr_unaligned: UnalignedPtr<[i32; 3]> = UnalignedPtr { data: &arr }; - let arr_unaligned: UnalignedPtr<[i32]> = arr_unaligned; -} |