1 error[E0412]: cannot find type `Apple` in this scope
2 --> $DIR/issue-35675.rs:7:29
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
8 LL | fn should_return_fruit() -> Fruit {
11 error[E0425]: cannot find function `Apple` in this scope
12 --> $DIR/issue-35675.rs:9:5
15 | ^^^^^ not found in this scope
16 help: possible candidate is found in another module, you can import it into scope
18 LL | use Fruit::Apple;
21 error[E0573]: expected type, found variant `Fruit::Apple`
22 --> $DIR/issue-35675.rs:13:33
24 LL | fn should_return_fruit_too() -> Fruit::Apple {
28 | help: try using the variant's enum: `Fruit`
30 error[E0425]: cannot find function `Apple` in this scope
31 --> $DIR/issue-35675.rs:15:5
34 | ^^^^^ not found in this scope
35 help: possible candidate is found in another module, you can import it into scope
37 LL | use Fruit::Apple;
40 error[E0573]: expected type, found variant `Ok`
41 --> $DIR/issue-35675.rs:19:13
47 | help: try using the variant's enum: `std::result::Result`
49 error[E0412]: cannot find type `Variant3` in this scope
50 --> $DIR/issue-35675.rs:24:13
52 LL | fn bar() -> Variant3 {
53 | ^^^^^^^^ not found in this scope
54 help: there is an enum variant `x::Enum::Variant3`; try using the variant's enum
56 LL | fn bar() -> x::Enum {
59 error[E0573]: expected type, found variant `Some`
60 --> $DIR/issue-35675.rs:28:13
62 LL | fn qux() -> Some {
66 | help: try using the variant's enum: `Option`
68 error: aborting due to 7 previous errors
70 Some errors occurred: E0412, E0425, E0573.
71 For more information about an error, try `rustc --explain E0412`.