fork/rust

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

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

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