diff options
Diffstat (limited to 'tests/ui/suggestions/issue-88730.rs')
-rw-r--r-- | tests/ui/suggestions/issue-88730.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/suggestions/issue-88730.rs b/tests/ui/suggestions/issue-88730.rs new file mode 100644 index 000000000..d161ed284 --- /dev/null +++ b/tests/ui/suggestions/issue-88730.rs @@ -0,0 +1,15 @@ +#![allow(unused, nonstandard_style)] + +// If an enum has two different variants, +// then it cannot be matched upon in a function argument. +// It still gets an error, but no suggestions. +enum Foo { + C, + D, +} + +fn foo(C: Foo) {} //~ERROR + +fn main() { + let C = Foo::D; //~ERROR +} |