]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-35675.stderr
enum type instead of variant suggestion unification
[rust.git] / src / test / ui / issues / issue-35675.stderr
1 error[E0412]: cannot find type `Apple` in this scope
2   --> $DIR/issue-35675.rs:17:29
3    |
4 LL | fn should_return_fruit() -> Apple {
5    |                             ^^^^^ not found in this scope
6 help: there is an enum variant `Fruit::Apple`; try using the variant's enum
7    |
8 LL | fn should_return_fruit() -> Fruit {
9    |                             ^^^^^
10
11 error[E0425]: cannot find function `Apple` in this scope
12   --> $DIR/issue-35675.rs:19:5
13    |
14 LL |     Apple(5)
15    |     ^^^^^ not found in this scope
16 help: possible candidate is found in another module, you can import it into scope
17    |
18 LL | use Fruit::Apple;
19    |
20
21 error[E0573]: expected type, found variant `Fruit::Apple`
22   --> $DIR/issue-35675.rs:23:33
23    |
24 LL | fn should_return_fruit_too() -> Fruit::Apple {
25    |                                 ^^^^^^^^^^^^
26    |                                 |
27    |                                 not a type
28    |                                 help: try using the variant's enum: `Fruit`
29
30 error[E0425]: cannot find function `Apple` in this scope
31   --> $DIR/issue-35675.rs:25:5
32    |
33 LL |     Apple(5)
34    |     ^^^^^ not found in this scope
35 help: possible candidate is found in another module, you can import it into scope
36    |
37 LL | use Fruit::Apple;
38    |
39
40 error[E0573]: expected type, found variant `Ok`
41   --> $DIR/issue-35675.rs:29:13
42    |
43 LL | fn foo() -> Ok {
44    |             ^^ not a type
45 help: try using the variant's enum
46    |
47 LL | fn foo() -> std::prelude::v1 {
48    |             ^^^^^^^^^^^^^^^^
49 LL | fn foo() -> std::result::Result {
50    |             ^^^^^^^^^^^^^^^^^^^
51
52 error[E0412]: cannot find type `Variant3` in this scope
53   --> $DIR/issue-35675.rs:34:13
54    |
55 LL | fn bar() -> Variant3 {
56    |             ^^^^^^^^ not found in this scope
57 help: there is an enum variant `x::Enum::Variant3`; try using the variant's enum
58    |
59 LL | fn bar() -> x::Enum {
60    |             ^^^^^^^
61
62 error[E0573]: expected type, found variant `Some`
63   --> $DIR/issue-35675.rs:38:13
64    |
65 LL | fn qux() -> Some {
66    |             ^^^^ not a type
67 help: try using the variant's enum
68    |
69 LL | fn qux() -> std::prelude::v1::Option {
70    |             ^^^^^^^^^^^^^^^^^^^^^^^^
71 LL | fn qux() -> std::prelude::v1 {
72    |             ^^^^^^^^^^^^^^^^
73
74 error: aborting due to 7 previous errors
75
76 Some errors occurred: E0412, E0425, E0573.
77 For more information about an error, try `rustc --explain E0412`.