From c547f51de10ad5e1d45a8b075c9000b1ecf6d5fa Mon Sep 17 00:00:00 2001 From: Ben Kimock Date: Sat, 14 Sep 2024 17:30:07 -0400 Subject: [PATCH] Add a test --- tests/ui/transmutability/enums/niche_optimization.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/ui/transmutability/enums/niche_optimization.rs b/tests/ui/transmutability/enums/niche_optimization.rs index 802d1747568..acb1856d082 100644 --- a/tests/ui/transmutability/enums/niche_optimization.rs +++ b/tests/ui/transmutability/enums/niche_optimization.rs @@ -154,3 +154,12 @@ enum OptionLike { assert::is_transmutable::>, OptionLike>(); assert::is_transmutable::>, OptionLike>(); } + +fn niche_fields() { + enum Kind { + A(bool, bool), + B(bool), + } + + assert::is_transmutable::(); +}