rust/src/test/ui/issues/issue-17546.stderr

92 lines
2.6 KiB
Plaintext
Raw Normal View History

2018-07-15 16:11:54 -05:00
error[E0573]: expected type, found variant `NoResult`
2018-12-25 09:56:47 -06:00
--> $DIR/issue-17546.rs:12:17
2018-07-15 16:11:54 -05:00
|
LL | fn new() -> NoResult<MyEnum, String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
::: $SRC_DIR/libcore/result.rs:LL:COL
|
LL | / pub enum Result<T, E> {
LL | | /// Contains the success value
LL | | #[stable(feature = "rust1", since = "1.0.0")]
LL | | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
... |
LL | | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
LL | | }
| |_- similarly named enum `Result` defined here
|
help: try using the variant's enum
|
LL | fn new() -> foo::MyEnum {
| ^^^^^^^^^^^
help: an enum with a similar name exists
|
LL | fn new() -> Result<MyEnum, String> {
| ^^^^^^
2018-07-15 16:11:54 -05:00
error[E0573]: expected type, found variant `Result`
2018-12-25 09:56:47 -06:00
--> $DIR/issue-17546.rs:22:17
2018-07-15 16:11:54 -05:00
|
LL | fn new() -> Result<foo::MyEnum, String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a type
|
2018-07-15 16:11:54 -05:00
help: possible better candidates are found in other modules, you can import them into scope
|
LL | use std::fmt::Result;
|
LL | use std::io::Result;
|
LL | use std::prelude::v1::Result;
|
LL | use std::result::Result;
|
2019-10-19 12:08:54 -05:00
and 1 other candidate
2018-07-15 16:11:54 -05:00
error[E0573]: expected type, found variant `Result`
2018-12-25 09:56:47 -06:00
--> $DIR/issue-17546.rs:28:13
2018-07-15 16:11:54 -05:00
|
LL | fn new() -> Result<foo::MyEnum, String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a type
|
2018-07-15 16:11:54 -05:00
help: possible better candidates are found in other modules, you can import them into scope
|
LL | use std::fmt::Result;
|
LL | use std::io::Result;
|
LL | use std::prelude::v1::Result;
|
LL | use std::result::Result;
|
2019-10-19 12:08:54 -05:00
and 1 other candidate
2018-07-15 16:11:54 -05:00
error[E0573]: expected type, found variant `NoResult`
2018-12-25 09:56:47 -06:00
--> $DIR/issue-17546.rs:33:15
2018-07-15 16:11:54 -05:00
|
LL | fn newer() -> NoResult<foo::MyEnum, String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: $SRC_DIR/libcore/result.rs:LL:COL
|
LL | / pub enum Result<T, E> {
LL | | /// Contains the success value
LL | | #[stable(feature = "rust1", since = "1.0.0")]
LL | | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
... |
LL | | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
LL | | }
| |_- similarly named enum `Result` defined here
|
help: try using the variant's enum
|
LL | fn newer() -> foo::MyEnum {
| ^^^^^^^^^^^
help: an enum with a similar name exists
|
LL | fn newer() -> Result<foo::MyEnum, String> {
| ^^^^^^
2018-07-15 16:11:54 -05:00
error: aborting due to 4 previous errors
2019-10-09 07:19:48 -05:00
For more information about this error, try `rustc --explain E0573`.