summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/issue-88730.rs
blob: d161ed284f6d9dd292ce523ffb1ebaa99e4c7e67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
}