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