2022-04-27 02:59:50 +00:00
|
|
|
error[E0599]: no method named `get` found for enum `Result` in the current scope
|
2022-05-30 21:18:03 +00:00
|
|
|
--> $DIR/enum-method-probe.rs:24:9
|
2022-04-27 02:59:50 +00:00
|
|
|
|
|
|
|
|
LL | res.get();
|
|
|
|
| ^^^ method not found in `Result<Foo, ()>`
|
|
|
|
|
|
|
|
|
note: the method `get` exists on the type `Foo`
|
2022-05-30 21:18:03 +00:00
|
|
|
--> $DIR/enum-method-probe.rs:9:5
|
2022-04-27 02:59:50 +00:00
|
|
|
|
|
|
|
|
LL | fn get(&self) -> u8 {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
help: use the `?` operator to extract the `Foo` value, propagating a `Result::Err` value to the caller
|
|
|
|
|
|
|
|
|
LL | res?.get();
|
|
|
|
| +
|
|
|
|
|
|
|
|
error[E0599]: no method named `get` found for enum `Result` in the current scope
|
2022-05-30 21:18:03 +00:00
|
|
|
--> $DIR/enum-method-probe.rs:39:9
|
2022-04-27 02:59:50 +00:00
|
|
|
|
|
|
|
|
LL | res.get();
|
|
|
|
| ^^^ method not found in `Result<Foo, ()>`
|
|
|
|
|
|
|
|
|
note: the method `get` exists on the type `Foo`
|
2022-05-30 21:18:03 +00:00
|
|
|
--> $DIR/enum-method-probe.rs:9:5
|
2022-04-27 02:59:50 +00:00
|
|
|
|
|
|
|
|
LL | fn get(&self) -> u8 {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
2022-05-30 21:18:03 +00:00
|
|
|
help: consider using `Result::expect` to unwrap the `Foo` value, panicking if the value is a `Result::Err`
|
|
|
|
|
|
|
|
|
LL | res.expect("REASON").get();
|
|
|
|
| +++++++++++++++++
|
|
|
|
|
|
|
|
error[E0599]: no method named `get` found for enum `Result` in the current scope
|
|
|
|
--> $DIR/enum-method-probe.rs:16:9
|
|
|
|
|
|
|
|
|
LL | res.get();
|
|
|
|
| ^^^ method not found in `Result<Foo, ()>`
|
|
|
|
|
|
|
|
|
note: the method `get` exists on the type `Foo`
|
|
|
|
--> $DIR/enum-method-probe.rs:9:5
|
|
|
|
|
|
|
|
|
LL | fn get(&self) -> u8 {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
help: use the `?` operator to extract the `Foo` value, propagating a `Result::Err` value to the caller
|
|
|
|
|
|
|
|
|
LL | res?.get();
|
|
|
|
| +
|
|
|
|
|
|
|
|
error[E0599]: no method named `get` found for enum `Result` in the current scope
|
|
|
|
--> $DIR/enum-method-probe.rs:32:9
|
|
|
|
|
|
|
|
|
LL | res.get();
|
|
|
|
| ^^^ method not found in `Result<Foo, ()>`
|
|
|
|
|
|
|
|
|
note: the method `get` exists on the type `Foo`
|
|
|
|
--> $DIR/enum-method-probe.rs:9:5
|
|
|
|
|
|
|
|
|
LL | fn get(&self) -> u8 {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
help: consider using `Result::expect` to unwrap the `Foo` value, panicking if the value is a `Result::Err`
|
2022-04-27 02:59:50 +00:00
|
|
|
|
|
|
|
|
LL | res.expect("REASON").get();
|
|
|
|
| +++++++++++++++++
|
|
|
|
|
|
|
|
error[E0599]: no method named `get` found for enum `Option` in the current scope
|
2022-05-30 21:18:03 +00:00
|
|
|
--> $DIR/enum-method-probe.rs:46:9
|
2022-04-27 02:59:50 +00:00
|
|
|
|
|
|
|
|
LL | res.get();
|
|
|
|
| ^^^ method not found in `Option<Foo>`
|
|
|
|
|
|
|
|
|
note: the method `get` exists on the type `Foo`
|
2022-05-30 21:18:03 +00:00
|
|
|
--> $DIR/enum-method-probe.rs:9:5
|
2022-04-27 02:59:50 +00:00
|
|
|
|
|
|
|
|
LL | fn get(&self) -> u8 {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
2022-05-30 21:18:03 +00:00
|
|
|
help: use the `?` operator to extract the `Foo` value, propagating an `Option::None` value to the caller
|
2022-04-27 02:59:50 +00:00
|
|
|
|
|
|
|
|
LL | res?.get();
|
|
|
|
| +
|
|
|
|
|
|
|
|
error[E0599]: no method named `get` found for enum `Option` in the current scope
|
2022-05-30 21:18:03 +00:00
|
|
|
--> $DIR/enum-method-probe.rs:54:9
|
2022-04-27 02:59:50 +00:00
|
|
|
|
|
|
|
|
LL | res.get();
|
|
|
|
| ^^^ method not found in `Option<Foo>`
|
|
|
|
|
|
|
|
|
note: the method `get` exists on the type `Foo`
|
2022-05-30 21:18:03 +00:00
|
|
|
--> $DIR/enum-method-probe.rs:9:5
|
2022-04-27 02:59:50 +00:00
|
|
|
|
|
|
|
|
LL | fn get(&self) -> u8 {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
2022-05-30 21:18:03 +00:00
|
|
|
help: consider using `Option::expect` to unwrap the `Foo` value, panicking if the value is an `Option::None`
|
2022-04-27 02:59:50 +00:00
|
|
|
|
|
|
|
|
LL | res.expect("REASON").get();
|
|
|
|
| +++++++++++++++++
|
|
|
|
|
2022-05-30 21:18:03 +00:00
|
|
|
error: aborting due to 6 previous errors
|
2022-04-27 02:59:50 +00:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0599`.
|