fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

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