]>
Commit | Line | Data |
---|---|---|
8faf50e0 | 1 | error[E0573]: expected type, found variant `NoResult` |
72b1a166 | 2 | --> $DIR/issue-17546.rs:14:17 |
8faf50e0 XL |
3 | | |
4 | LL | fn new() -> NoResult<MyEnum, String> { | |
0731742a | 5 | | ^^^^^^^^^^^^^^^^^^^^^^^^ |
46de9a89 | 6 | | |
72b1a166 | 7 | ::: $SRC_DIR/core/src/result.rs:LL:COL |
46de9a89 FG |
8 | | |
9 | LL | pub enum Result<T, E> { | |
10 | | --------------------- similarly named enum `Result` defined here | |
e74abb32 | 11 | | |
0731742a XL |
12 | help: try using the variant's enum |
13 | | | |
14 | LL | fn new() -> foo::MyEnum { | |
15 | | ^^^^^^^^^^^ | |
16 | help: an enum with a similar name exists | |
17 | | | |
18 | LL | fn new() -> Result<MyEnum, String> { | |
19 | | ^^^^^^ | |
8faf50e0 XL |
20 | |
21 | error[E0573]: expected type, found variant `Result` | |
72b1a166 | 22 | --> $DIR/issue-17546.rs:24:17 |
8faf50e0 XL |
23 | | |
24 | LL | fn new() -> Result<foo::MyEnum, String> { | |
25 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a type | |
e74abb32 | 26 | | |
72b1a166 | 27 | help: consider importing one of these items instead |
8faf50e0 XL |
28 | | |
29 | LL | use std::fmt::Result; | |
30 | | | |
31 | LL | use std::io::Result; | |
32 | | | |
8faf50e0 XL |
33 | LL | use std::result::Result; |
34 | | | |
72b1a166 FG |
35 | LL | use std::thread::Result; |
36 | | | |
8faf50e0 XL |
37 | |
38 | error[E0573]: expected type, found variant `Result` | |
72b1a166 | 39 | --> $DIR/issue-17546.rs:30:13 |
8faf50e0 XL |
40 | | |
41 | LL | fn new() -> Result<foo::MyEnum, String> { | |
42 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a type | |
e74abb32 | 43 | | |
72b1a166 | 44 | help: consider importing one of these items instead |
8faf50e0 XL |
45 | | |
46 | LL | use std::fmt::Result; | |
47 | | | |
48 | LL | use std::io::Result; | |
49 | | | |
8faf50e0 XL |
50 | LL | use std::result::Result; |
51 | | | |
72b1a166 FG |
52 | LL | use std::thread::Result; |
53 | | | |
8faf50e0 XL |
54 | |
55 | error[E0573]: expected type, found variant `NoResult` | |
72b1a166 | 56 | --> $DIR/issue-17546.rs:35:15 |
8faf50e0 XL |
57 | | |
58 | LL | fn newer() -> NoResult<foo::MyEnum, String> { | |
0731742a | 59 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
46de9a89 | 60 | | |
72b1a166 | 61 | ::: $SRC_DIR/core/src/result.rs:LL:COL |
46de9a89 FG |
62 | | |
63 | LL | pub enum Result<T, E> { | |
64 | | --------------------- similarly named enum `Result` defined here | |
e74abb32 | 65 | | |
0731742a XL |
66 | help: try using the variant's enum |
67 | | | |
68 | LL | fn newer() -> foo::MyEnum { | |
69 | | ^^^^^^^^^^^ | |
70 | help: an enum with a similar name exists | |
71 | | | |
72 | LL | fn newer() -> Result<foo::MyEnum, String> { | |
73 | | ^^^^^^ | |
8faf50e0 XL |
74 | |
75 | error: aborting due to 4 previous errors | |
76 | ||
e74abb32 | 77 | For more information about this error, try `rustc --explain E0573`. |