fork/rust

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

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

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