-
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.
- Loading branch information
1 parent
5e0eece
commit 33da535
Showing
4 changed files
with
203 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,88 @@ | ||
error: Question mark operator is useless here | ||
--> $DIR/needless_question_mark.rs:15:12 | ||
--> $DIR/needless_question_mark.rs:17:12 | ||
| | ||
LL | return Some(to.magic?); | ||
| ^^^^^^^^^^^^^^^ help: try: `to.magic` | ||
| | ||
= note: `-D clippy::needless-question-mark` implied by `-D warnings` | ||
|
||
error: Question mark operator is useless here | ||
--> $DIR/needless_question_mark.rs:23:12 | ||
--> $DIR/needless_question_mark.rs:25:12 | ||
| | ||
LL | return Some(to.magic?) | ||
| ^^^^^^^^^^^^^^^ help: try: `to.magic` | ||
|
||
error: Question mark operator is useless here | ||
--> $DIR/needless_question_mark.rs:28:5 | ||
--> $DIR/needless_question_mark.rs:30:5 | ||
| | ||
LL | Some(to.magic?) | ||
| ^^^^^^^^^^^^^^^ help: try: `to.magic` | ||
|
||
error: Question mark operator is useless here | ||
--> $DIR/needless_question_mark.rs:33:21 | ||
--> $DIR/needless_question_mark.rs:35:21 | ||
| | ||
LL | to.and_then(|t| Some(t.magic?)) | ||
| ^^^^^^^^^^^^^^ help: try: `t.magic` | ||
|
||
error: Question mark operator is useless here | ||
--> $DIR/needless_question_mark.rs:42:9 | ||
--> $DIR/needless_question_mark.rs:44:9 | ||
| | ||
LL | Some(t.magic?) | ||
| ^^^^^^^^^^^^^^ help: try: `t.magic` | ||
|
||
error: Question mark operator is useless here | ||
--> $DIR/needless_question_mark.rs:47:12 | ||
--> $DIR/needless_question_mark.rs:49:12 | ||
| | ||
LL | return Ok(tr.magic?); | ||
| ^^^^^^^^^^^^^ help: try: `tr.magic` | ||
|
||
error: Question mark operator is useless here | ||
--> $DIR/needless_question_mark.rs:54:12 | ||
--> $DIR/needless_question_mark.rs:56:12 | ||
| | ||
LL | return Ok(tr.magic?) | ||
| ^^^^^^^^^^^^^ help: try: `tr.magic` | ||
|
||
error: Question mark operator is useless here | ||
--> $DIR/needless_question_mark.rs:58:5 | ||
--> $DIR/needless_question_mark.rs:60:5 | ||
| | ||
LL | Ok(tr.magic?) | ||
| ^^^^^^^^^^^^^ help: try: `tr.magic` | ||
|
||
error: Question mark operator is useless here | ||
--> $DIR/needless_question_mark.rs:62:21 | ||
--> $DIR/needless_question_mark.rs:64:21 | ||
| | ||
LL | tr.and_then(|t| Ok(t.magic?)) | ||
| ^^^^^^^^^^^^ help: try: `t.magic` | ||
|
||
error: Question mark operator is useless here | ||
--> $DIR/needless_question_mark.rs:70:9 | ||
--> $DIR/needless_question_mark.rs:72:9 | ||
| | ||
LL | Ok(t.magic?) | ||
| ^^^^^^^^^^^^ help: try: `t.magic` | ||
|
||
error: Question mark operator is useless here | ||
--> $DIR/needless_question_mark.rs:77:16 | ||
--> $DIR/needless_question_mark.rs:79:16 | ||
| | ||
LL | return Ok(t.magic?); | ||
| ^^^^^^^^^^^^ help: try: `t.magic` | ||
|
||
error: aborting due to 11 previous errors | ||
error: Question mark operator is useless here | ||
--> $DIR/needless_question_mark.rs:132:9 | ||
| | ||
LL | Ok(to.magic?) // should be triggered | ||
| ^^^^^^^^^^^^^ help: try: `to.magic` | ||
|
||
error: Question mark operator is useless here | ||
--> $DIR/needless_question_mark.rs:148:9 | ||
| | ||
LL | Some(to.magic?) // should be triggered | ||
| ^^^^^^^^^^^^^^^ help: try: `to.magic` | ||
|
||
error: Question mark operator is useless here | ||
--> $DIR/needless_question_mark.rs:156:9 | ||
| | ||
LL | Ok(to.magic?) // should be triggered | ||
| ^^^^^^^^^^^^^ help: try: `to.magic` | ||
|
||
error: aborting due to 14 previous errors | ||
|