diff options
Diffstat (limited to 'tests/ui/consts/const_discriminant.rs')
-rw-r--r-- | tests/ui/consts/const_discriminant.rs | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/tests/ui/consts/const_discriminant.rs b/tests/ui/consts/const_discriminant.rs index 79e68590e..b1180faa6 100644 --- a/tests/ui/consts/const_discriminant.rs +++ b/tests/ui/consts/const_discriminant.rs @@ -24,13 +24,6 @@ enum SingleVariant { const TEST_V: Discriminant<SingleVariant> = discriminant(&SingleVariant::V); -pub const TEST_VOID: () = { - // This is UB, but CTFE does not check validity so it does not detect this. - // This is a regression test for https://github.com/rust-lang/rust/issues/89765. - unsafe { std::mem::discriminant(&*(&() as *const () as *const Void)); }; -}; - - fn main() { assert_eq!(TEST_A, TEST_A_OTHER); assert_eq!(TEST_A, discriminant(black_box(&Test::A(17)))); |