diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/consts/issue-88649.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/ui/consts/issue-88649.rs b/src/test/ui/consts/issue-88649.rs new file mode 100644 index 000000000..43e562b5a --- /dev/null +++ b/src/test/ui/consts/issue-88649.rs @@ -0,0 +1,18 @@ +// check-pass +#![crate_type = "lib"] + +enum Foo { + Variant1(bool), + Variant2(bool), +} + +const _: () = { + let mut n = 0; + while n < 2 { + match Foo::Variant1(true) { + Foo::Variant1(x) | Foo::Variant2(x) if x => {} + _ => {} + } + n += 1; + } +}; |