-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix unwrap not to lint the #[test]ing code
- Loading branch information
chansuke
committed
Aug 6, 2020
1 parent
2d4c337
commit 01f9664
Showing
3 changed files
with
35 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,15 @@ | ||
error: used `unwrap()` on `an Option` value | ||
--> $DIR/unwrap.rs:5:13 | ||
error[E0425]: cannot find function `with_test` in this scope | ||
--> $DIR/unwrap.rs:30:5 | ||
| | ||
LL | let _ = opt.unwrap(); | ||
| ^^^^^^^^^^^^ | ||
| | ||
= note: `-D clippy::unwrap-used` implied by `-D warnings` | ||
= help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message | ||
LL | with_test(); | ||
| ^^^^^^^^^ not found in this scope | ||
|
||
error: used `unwrap()` on `a Result` value | ||
--> $DIR/unwrap.rs:10:13 | ||
| | ||
LL | let _ = res.unwrap(); | ||
| ^^^^^^^^^^^^ | ||
error[E0425]: cannot find function `with_cfg_test` in this scope | ||
--> $DIR/unwrap.rs:31:5 | ||
| | ||
= help: if you don't want to handle the `Err` case gracefully, consider using `expect()` to provide a better panic message | ||
LL | with_cfg_test(); | ||
| ^^^^^^^^^^^^^ not found in this scope | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0425`. |