2019-06-22 20:34:07 +00:00
|
|
|
error: returning an `Err(_)` with the `?` operator
|
2020-11-23 12:51:04 +00:00
|
|
|
--> $DIR/try_err.rs:19:9
|
2019-06-19 03:22:51 +00:00
|
|
|
|
|
2019-06-25 01:28:46 +00:00
|
|
|
LL | Err(err)?;
|
|
|
|
| ^^^^^^^^^ help: try this: `return Err(err)`
|
2019-06-19 03:22:51 +00:00
|
|
|
|
|
2020-01-31 19:21:10 +00:00
|
|
|
note: the lint level is defined here
|
2019-10-24 05:52:01 +00:00
|
|
|
--> $DIR/try_err.rs:4:9
|
2019-06-19 03:22:51 +00:00
|
|
|
|
|
|
|
|
LL | #![deny(clippy::try_err)]
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
2019-06-22 20:34:07 +00:00
|
|
|
error: returning an `Err(_)` with the `?` operator
|
2020-11-23 12:51:04 +00:00
|
|
|
--> $DIR/try_err.rs:29:9
|
2019-06-19 03:22:51 +00:00
|
|
|
|
|
2019-06-25 01:28:46 +00:00
|
|
|
LL | Err(err)?;
|
|
|
|
| ^^^^^^^^^ help: try this: `return Err(err.into())`
|
2019-06-19 03:22:51 +00:00
|
|
|
|
2019-06-22 20:34:07 +00:00
|
|
|
error: returning an `Err(_)` with the `?` operator
|
2020-11-23 12:51:04 +00:00
|
|
|
--> $DIR/try_err.rs:49:17
|
2019-06-19 03:22:51 +00:00
|
|
|
|
|
2019-06-25 01:28:46 +00:00
|
|
|
LL | Err(err)?;
|
|
|
|
| ^^^^^^^^^ help: try this: `return Err(err)`
|
2019-06-19 03:22:51 +00:00
|
|
|
|
2019-06-22 20:34:07 +00:00
|
|
|
error: returning an `Err(_)` with the `?` operator
|
2020-11-23 12:51:04 +00:00
|
|
|
--> $DIR/try_err.rs:68:17
|
2019-06-19 03:22:51 +00:00
|
|
|
|
|
2019-06-25 01:28:46 +00:00
|
|
|
LL | Err(err)?;
|
|
|
|
| ^^^^^^^^^ help: try this: `return Err(err.into())`
|
2019-06-19 03:22:51 +00:00
|
|
|
|
2019-08-08 12:33:34 +00:00
|
|
|
error: returning an `Err(_)` with the `?` operator
|
2020-11-23 12:51:04 +00:00
|
|
|
--> $DIR/try_err.rs:87:23
|
|
|
|
|
|
|
|
|
LL | Err(_) => Err(1)?,
|
|
|
|
| ^^^^^^^ help: try this: `return Err(1)`
|
|
|
|
...
|
|
|
|
LL | try_validation!(Ok::<_, i32>(5));
|
|
|
|
| --------------------------------- in this macro invocation
|
|
|
|
|
|
2021-02-13 19:52:25 +00:00
|
|
|
= note: this error originates in the macro `try_validation` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2020-11-23 12:51:04 +00:00
|
|
|
|
|
|
|
error: returning an `Err(_)` with the `?` operator
|
|
|
|
--> $DIR/try_err.rs:102:23
|
|
|
|
|
|
|
|
|
LL | Err(_) => Err(ret_one!())?,
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: try this: `return Err(ret_one!())`
|
|
|
|
...
|
|
|
|
LL | try_validation_in_macro!(Ok::<_, i32>(5));
|
|
|
|
| ------------------------------------------ in this macro invocation
|
|
|
|
|
|
2021-02-13 19:52:25 +00:00
|
|
|
= note: this error originates in the macro `try_validation_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2020-11-23 12:51:04 +00:00
|
|
|
|
|
|
|
error: returning an `Err(_)` with the `?` operator
|
|
|
|
--> $DIR/try_err.rs:141:9
|
2019-08-08 12:33:34 +00:00
|
|
|
|
|
|
|
|
LL | Err(foo!())?;
|
|
|
|
| ^^^^^^^^^^^^ help: try this: `return Err(foo!())`
|
|
|
|
|
2020-08-11 13:43:21 +00:00
|
|
|
error: returning an `Err(_)` with the `?` operator
|
2020-11-23 12:51:04 +00:00
|
|
|
--> $DIR/try_err.rs:148:9
|
2020-08-11 13:43:21 +00:00
|
|
|
|
|
|
|
|
LL | Err(io::ErrorKind::WriteZero)?
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `return Poll::Ready(Err(io::ErrorKind::WriteZero.into()))`
|
|
|
|
|
|
|
|
error: returning an `Err(_)` with the `?` operator
|
2020-11-23 12:51:04 +00:00
|
|
|
--> $DIR/try_err.rs:150:9
|
2020-08-11 13:43:21 +00:00
|
|
|
|
|
|
|
|
LL | Err(io::Error::new(io::ErrorKind::InvalidInput, "error"))?
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `return Poll::Ready(Err(io::Error::new(io::ErrorKind::InvalidInput, "error")))`
|
|
|
|
|
|
|
|
error: returning an `Err(_)` with the `?` operator
|
2020-11-23 12:51:04 +00:00
|
|
|
--> $DIR/try_err.rs:158:9
|
2020-08-11 13:43:21 +00:00
|
|
|
|
|
|
|
|
LL | Err(io::ErrorKind::NotFound)?
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `return Poll::Ready(Some(Err(io::ErrorKind::NotFound.into())))`
|
|
|
|
|
2021-04-22 09:31:13 +00:00
|
|
|
error: returning an `Err(_)` with the `?` operator
|
|
|
|
--> $DIR/try_err.rs:167:16
|
|
|
|
|
|
|
|
|
LL | return Err(42)?;
|
|
|
|
| ^^^^^^^^ help: try this: `Err(42)`
|
|
|
|
|
|
|
|
error: aborting due to 11 previous errors
|
2019-06-19 03:22:51 +00:00
|
|
|
|