Skip to content

Commit 6b818dd

Browse files
committed
Fix article in test
1 parent 66573b7 commit 6b818dd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/ui/lint/for_loop_over_fallibles.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fn _returns_result() -> Result<(), ()> {
4545
fn _by_ref() {
4646
// Shared refs
4747
for _ in &Some(1) {}
48-
//~^ WARN for loop over an `&Option`. This is more readably written as an `if let` statement
48+
//~^ WARN for loop over a `&Option`. This is more readably written as an `if let` statement
4949
//~| HELP to check pattern in a loop use `while let`
5050
//~| HELP consider using `if let` to clear intent
5151
for _ in &Ok::<_, ()>(1) {}
@@ -55,7 +55,7 @@ fn _by_ref() {
5555

5656
// Mutable refs
5757
for _ in &mut Some(1) {}
58-
//~^ WARN for loop over an `&mut Option`. This is more readably written as an `if let` statement
58+
//~^ WARN for loop over a `&mut Option`. This is more readably written as an `if let` statement
5959
//~| HELP to check pattern in a loop use `while let`
6060
//~| HELP consider using `if let` to clear intent
6161
for _ in &mut Ok::<_, ()>(1) {}

tests/ui/lint/for_loop_over_fallibles.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ help: consider using `if let` to clear intent
9797
LL | if let Ok(_) = Ok::<_, ()>([0; 0]) {}
9898
| ~~~~~~~~~~ ~~~
9999

100-
warning: for loop over an `&Option`. This is more readably written as an `if let` statement
100+
warning: for loop over a `&Option`. This is more readably written as an `if let` statement
101101
--> $DIR/for_loop_over_fallibles.rs:47:14
102102
|
103103
LL | for _ in &Some(1) {}
@@ -127,7 +127,7 @@ help: consider using `if let` to clear intent
127127
LL | if let Ok(_) = &Ok::<_, ()>(1) {}
128128
| ~~~~~~~~~~ ~~~
129129

130-
warning: for loop over an `&mut Option`. This is more readably written as an `if let` statement
130+
warning: for loop over a `&mut Option`. This is more readably written as an `if let` statement
131131
--> $DIR/for_loop_over_fallibles.rs:57:14
132132
|
133133
LL | for _ in &mut Some(1) {}

0 commit comments

Comments
 (0)