-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
57a9cf4
commit bbe49d1
Showing
7 changed files
with
99 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,78 @@ | ||
error: expected one of `(`, `,`, `::`, or `=`, found `-` | ||
--> $DIR/try_err.rs:6:26 | ||
error: returning an `Err(_)` with the `?` operator | ||
--> $DIR/try_err.rs:19:9 | ||
| | ||
LL | #![allow(clippy::needless-question-mark)] | ||
| ^ expected one of `(`, `,`, `::`, or `=` | ||
LL | Err(err)?; | ||
| ^^^^^^^^^ help: try this: `return Err(err)` | ||
| | ||
note: the lint level is defined here | ||
--> $DIR/try_err.rs:4:9 | ||
| | ||
LL | #![deny(clippy::try_err)] | ||
| ^^^^^^^^^^^^^^^ | ||
|
||
error: returning an `Err(_)` with the `?` operator | ||
--> $DIR/try_err.rs:29:9 | ||
| | ||
LL | Err(err)?; | ||
| ^^^^^^^^^ help: try this: `return Err(err.into())` | ||
|
||
error: returning an `Err(_)` with the `?` operator | ||
--> $DIR/try_err.rs:49:17 | ||
| | ||
LL | Err(err)?; | ||
| ^^^^^^^^^ help: try this: `return Err(err)` | ||
|
||
error: returning an `Err(_)` with the `?` operator | ||
--> $DIR/try_err.rs:68:17 | ||
| | ||
LL | Err(err)?; | ||
| ^^^^^^^^^ help: try this: `return Err(err.into())` | ||
|
||
error: returning an `Err(_)` with the `?` operator | ||
--> $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 | ||
| | ||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
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 | ||
| | ||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: returning an `Err(_)` with the `?` operator | ||
--> $DIR/try_err.rs:141:9 | ||
| | ||
LL | Err(foo!())?; | ||
| ^^^^^^^^^^^^ help: try this: `return Err(foo!())` | ||
|
||
error: returning an `Err(_)` with the `?` operator | ||
--> $DIR/try_err.rs:148:9 | ||
| | ||
LL | Err(io::ErrorKind::WriteZero)? | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `return Poll::Ready(Err(io::ErrorKind::WriteZero.into()))` | ||
|
||
error: returning an `Err(_)` with the `?` operator | ||
--> $DIR/try_err.rs:150:9 | ||
| | ||
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 | ||
--> $DIR/try_err.rs:158:9 | ||
| | ||
LL | Err(io::ErrorKind::NotFound)? | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `return Poll::Ready(Some(Err(io::ErrorKind::NotFound.into())))` | ||
|
||
error: aborting due to previous error | ||
error: aborting due to 10 previous errors | ||
|