diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-41213.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-41213.rs b/src/test/ui/issues/issue-41213.rs new file mode 100644 index 000000000..5c91bf711 --- /dev/null +++ b/src/test/ui/issues/issue-41213.rs @@ -0,0 +1,24 @@ +// run-pass +#![allow(dead_code)] +enum A { + A1, + A2, + A3, +} + +enum B { + B1(String, String), + B2(String, String), +} + +fn main() { + let a = A::A1; + loop { + let _ctor = match a { + A::A3 => break, + A::A1 => B::B1, + A::A2 => B::B2, + }; + break; + } +} |