Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/layout/tests.rs')
| -rw-r--r-- | crates/hir-ty/src/layout/tests.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/hir-ty/src/layout/tests.rs b/crates/hir-ty/src/layout/tests.rs index b9ee38c44f..b5db24e98b 100644 --- a/crates/hir-ty/src/layout/tests.rs +++ b/crates/hir-ty/src/layout/tests.rs @@ -610,6 +610,13 @@ fn enums_with_discriminants() { A = 1, // This one is (perhaps surprisingly) zero sized. } } + size_and_align! { + #[allow(overflowing_literals, clippy::enum_clike_unportable_variant)] + enum Goal { + A = 0, + B = 0x8000_0000_0000_0001, // Wraps around to a negative discriminant. + } + } } #[test] |