]> git.proxmox.com Git - rustc.git/blob - src/test/ui/suggestions/issue-88730.rs
New upstream version 1.57.0+dfsg1
[rustc.git] / src / test / ui / suggestions / issue-88730.rs
1 #![allow(unused, nonstandard_style)]
2 #![deny(bindings_with_variant_name)]
3
4 // If an enum has two different variants,
5 // then it cannot be matched upon in a function argument.
6 // It still gets a warning, but no suggestions.
7 enum Foo {
8 C,
9 D,
10 }
11
12 fn foo(C: Foo) {} //~ERROR
13
14 fn main() {
15 let C = Foo::D; //~ERROR
16 }