]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/issue-88730.rs
Make const/fn return params more suggestable
[rust.git] / tests / ui / suggestions / issue-88730.rs
1 #![allow(unused, nonstandard_style)]
2
3 // If an enum has two different variants,
4 // then it cannot be matched upon in a function argument.
5 // It still gets an error, but no suggestions.
6 enum Foo {
7     C,
8     D,
9 }
10
11 fn foo(C: Foo) {} //~ERROR
12
13 fn main() {
14     let C = Foo::D; //~ERROR
15 }