2018-07-15 21:11:54 +00:00
|
|
|
error[E0573]: expected type, found variant `NoResult`
|
2020-05-06 01:12:50 +00:00
|
|
|
--> $DIR/issue-17546.rs:14:17
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
2019-10-28 21:48:49 +00:00
|
|
|
LL | fn new() -> NoResult<MyEnum, String> {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-12-09 15:56:23 +00:00
|
|
|
--> $SRC_DIR/core/src/result.rs:LL:COL
|
2021-06-10 11:52:00 +00:00
|
|
|
|
|
2022-12-09 15:56:23 +00:00
|
|
|
= note: similarly named enum `Result` defined here
|
2019-10-24 05:20:58 +00:00
|
|
|
|
|
2019-01-09 19:11:00 +00:00
|
|
|
help: try using the variant's enum
|
|
|
|
|
|
|
|
|
LL | fn new() -> foo::MyEnum {
|
2021-06-22 02:07:19 +00:00
|
|
|
| ~~~~~~~~~~~
|
2019-01-09 19:11:00 +00:00
|
|
|
help: an enum with a similar name exists
|
|
|
|
|
|
|
|
|
LL | fn new() -> Result<MyEnum, String> {
|
2021-06-22 02:07:19 +00:00
|
|
|
| ~~~~~~
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
|
|
error[E0573]: expected type, found variant `Result`
|
2020-05-06 01:12:50 +00:00
|
|
|
--> $DIR/issue-17546.rs:24:17
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
|
|
|
LL | fn new() -> Result<foo::MyEnum, String> {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a type
|
2019-10-24 05:20:58 +00:00
|
|
|
|
|
2020-05-04 22:12:06 +00:00
|
|
|
help: consider importing one of these items instead
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
2023-03-18 02:18:39 +00:00
|
|
|
LL + use std::fmt::Result;
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
2023-03-18 02:18:39 +00:00
|
|
|
LL + use std::io::Result;
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
2023-03-18 02:18:39 +00:00
|
|
|
LL + use std::result::Result;
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
2023-03-18 02:18:39 +00:00
|
|
|
LL + use std::thread::Result;
|
2020-06-05 09:57:37 +00:00
|
|
|
|
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
|
|
error[E0573]: expected type, found variant `Result`
|
2020-05-06 01:12:50 +00:00
|
|
|
--> $DIR/issue-17546.rs:30:13
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
|
|
|
LL | fn new() -> Result<foo::MyEnum, String> {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a type
|
2019-10-24 05:20:58 +00:00
|
|
|
|
|
2020-05-04 22:12:06 +00:00
|
|
|
help: consider importing one of these items instead
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
2023-03-18 02:18:39 +00:00
|
|
|
LL + use std::fmt::Result;
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
2023-03-18 02:18:39 +00:00
|
|
|
LL + use std::io::Result;
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
2023-03-18 02:18:39 +00:00
|
|
|
LL + use std::result::Result;
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
2023-03-18 02:18:39 +00:00
|
|
|
LL + use std::thread::Result;
|
2020-06-05 09:57:37 +00:00
|
|
|
|
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
|
|
error[E0573]: expected type, found variant `NoResult`
|
2020-05-06 01:12:50 +00:00
|
|
|
--> $DIR/issue-17546.rs:35:15
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
2019-10-28 21:48:49 +00:00
|
|
|
LL | fn newer() -> NoResult<foo::MyEnum, String> {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-12-09 15:56:23 +00:00
|
|
|
--> $SRC_DIR/core/src/result.rs:LL:COL
|
2021-06-10 11:52:00 +00:00
|
|
|
|
|
2022-12-09 15:56:23 +00:00
|
|
|
= note: similarly named enum `Result` defined here
|
2019-10-24 05:20:58 +00:00
|
|
|
|
|
2019-01-09 19:11:00 +00:00
|
|
|
help: try using the variant's enum
|
|
|
|
|
|
|
|
|
LL | fn newer() -> foo::MyEnum {
|
2021-06-22 02:07:19 +00:00
|
|
|
| ~~~~~~~~~~~
|
2019-01-09 19:11:00 +00:00
|
|
|
help: an enum with a similar name exists
|
|
|
|
|
|
|
|
|
LL | fn newer() -> Result<foo::MyEnum, String> {
|
2021-06-22 02:07:19 +00:00
|
|
|
| ~~~~~~
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|
2019-10-09 12:19:48 +00:00
|
|
|
For more information about this error, try `rustc --explain E0573`.
|