Skip to content

Commit

Permalink
Add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
saethlin committed Sep 14, 2024
1 parent f827364 commit c547f51
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/ui/transmutability/enums/niche_optimization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,12 @@ fn no_niche() {
assert::is_transmutable::<Pair<V1, MaybeUninit<u8>>, OptionLike>();
assert::is_transmutable::<Pair<V2, MaybeUninit<u8>>, OptionLike>();
}

fn niche_fields() {
enum Kind {
A(bool, bool),
B(bool),
}

assert::is_transmutable::<u16, Kind>();
}

0 comments on commit c547f51

Please sign in to comment.