blob: e63210a3e987efd7c8bf7e1549b15b0aa8e01e0c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#![allow(unused, nonstandard_style)]
#![deny(bindings_with_variant_name)]
// If an enum has two different variants,
// then it cannot be matched upon in a function argument.
// It still gets a warning, but no suggestions.
enum Foo {
C,
D,
}
fn foo(C: Foo) {} //~ERROR
fn main() {
let C = Foo::D; //~ERROR
}
|