Skip to content

Commit

Permalink
expand comment
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung authored Nov 15, 2021
1 parent eebf676 commit 9ec8862
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/test/ui/consts/const_discriminant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ 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)); };
};

Expand Down

0 comments on commit 9ec8862

Please sign in to comment.