Skip to content

Commit c547f51

Browse files
committed
Add a test
1 parent f827364 commit c547f51

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: tests/ui/transmutability/enums/niche_optimization.rs

+9
Original file line numberDiff line numberDiff line change
@@ -154,3 +154,12 @@ fn no_niche() {
154154
assert::is_transmutable::<Pair<V1, MaybeUninit<u8>>, OptionLike>();
155155
assert::is_transmutable::<Pair<V2, MaybeUninit<u8>>, OptionLike>();
156156
}
157+
158+
fn niche_fields() {
159+
enum Kind {
160+
A(bool, bool),
161+
B(bool),
162+
}
163+
164+
assert::is_transmutable::<u16, Kind>();
165+
}

0 commit comments

Comments
 (0)