diff options
Diffstat (limited to 'src/test/ui/const-generics/issues/issue-61422.rs')
| -rw-r--r-- | src/test/ui/const-generics/issues/issue-61422.rs | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/test/ui/const-generics/issues/issue-61422.rs b/src/test/ui/const-generics/issues/issue-61422.rs deleted file mode 100644 index 0b9cf40d855..00000000000 --- a/src/test/ui/const-generics/issues/issue-61422.rs +++ /dev/null @@ -1,24 +0,0 @@ -// check-pass -use std::mem; - -// Neither of the uninits below are currently accepted as not UB, however, -// this code does not run and is merely checking that we do not ICE on this pattern, -// so this is fine. - -fn foo<const SIZE: usize>() { - let arr: [u8; SIZE] = unsafe { - #[allow(deprecated)] - let array: [u8; SIZE] = mem::uninitialized(); - array - }; -} - -fn bar<const SIZE: usize>() { - let arr: [u8; SIZE] = unsafe { - let array: [u8; SIZE] = mem::MaybeUninit::uninit().assume_init(); - array - }; -} - - -fn main() {} |
