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.1 KiB79 linesraw
1error[E0573]: expected type, found variant `NoResult`
2  --> $DIR/issue-17546.rs:12:17
3   |
4LL |     fn new() -> NoResult<MyEnum, String> {
5   |                 ^^^^^^^^^^^^^^^^^^^^^^^^
6   | 
7  ::: $SRC_DIR/libcore/result.rs:LL:COL
8   |
9LL | pub enum Result<T, E> {
10   | --------------------- similarly named enum `Result` defined here
11   |
12help: try using the variant's enum
13   |
14LL |     fn new() -> foo::MyEnum {
15   |                 ^^^^^^^^^^^
16help: an enum with a similar name exists
17   |
18LL |     fn new() -> Result<MyEnum, String> {
19   |                 ^^^^^^
20
21error[E0573]: expected type, found variant `Result`
22  --> $DIR/issue-17546.rs:22:17
23   |
24LL |     fn new() -> Result<foo::MyEnum, String> {
25   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a type
26   |
27help: possible better candidates are found in other modules, you can import them into scope
28   |
29LL |     use std::fmt::Result;
30   |
31LL |     use std::io::Result;
32   |
33LL |     use std::prelude::v1::Result;
34   |
35LL |     use std::result::Result;
36   |
37     and 1 other candidate
38
39error[E0573]: expected type, found variant `Result`
40  --> $DIR/issue-17546.rs:28:13
41   |
42LL | fn new() -> Result<foo::MyEnum, String> {
43   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a type
44   |
45help: possible better candidates are found in other modules, you can import them into scope
46   |
47LL | use std::fmt::Result;
48   |
49LL | use std::io::Result;
50   |
51LL | use std::prelude::v1::Result;
52   |
53LL | use std::result::Result;
54   |
55     and 1 other candidate
56
57error[E0573]: expected type, found variant `NoResult`
58  --> $DIR/issue-17546.rs:33:15
59   |
60LL | fn newer() -> NoResult<foo::MyEnum, String> {
61   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
62   | 
63  ::: $SRC_DIR/libcore/result.rs:LL:COL
64   |
65LL | pub enum Result<T, E> {
66   | --------------------- similarly named enum `Result` defined here
67   |
68help: try using the variant's enum
69   |
70LL | fn newer() -> foo::MyEnum {
71   |               ^^^^^^^^^^^
72help: an enum with a similar name exists
73   |
74LL | fn newer() -> Result<foo::MyEnum, String> {
75   |               ^^^^^^
76
77error: aborting due to 4 previous errors
78
79For more information about this error, try `rustc --explain E0573`.