mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
Add a test
This commit is contained in:
parent
f827364a95
commit
c547f51de1
@ -154,3 +154,12 @@ fn no_niche() {
|
|||||||
assert::is_transmutable::<Pair<V1, MaybeUninit<u8>>, OptionLike>();
|
assert::is_transmutable::<Pair<V1, MaybeUninit<u8>>, OptionLike>();
|
||||||
assert::is_transmutable::<Pair<V2, 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>();
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user