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 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/crates/hir-ty/src/layout/tests.rs b/crates/hir-ty/src/layout/tests.rs index 9543b4dcbc..1cd6d4eae2 100644 --- a/crates/hir-ty/src/layout/tests.rs +++ b/crates/hir-ty/src/layout/tests.rs @@ -147,6 +147,19 @@ fn tuple() { } #[test] +fn non_zero() { + check_size_and_align( + r#" + //- minicore: non_zero, option + use core::num::NonZeroU8; + struct Goal(Option<NonZeroU8>); + "#, + 1, + 1, + ); +} + +#[test] fn niche_optimization() { check_size_and_align( r#" |