about summary refs log tree commit diff
diff options
context:
space:
mode:
authorZachary S <zasample18+github@gmail.com>2024-05-15 13:15:59 -0500
committerZachary S <zasample18+github@gmail.com>2024-05-15 13:17:11 -0500
commit6b818ddac61e9771e3b97f17d8ab21cf9f7bc2de (patch)
tree4ac7c944eb94e41b2082b185af89970b8596dd38
parent66573b70a9b1807337f1980538d524e1dfd2aba1 (diff)
downloadrust-6b818ddac61e9771e3b97f17d8ab21cf9f7bc2de.tar.gz
rust-6b818ddac61e9771e3b97f17d8ab21cf9f7bc2de.zip
Fix article in test
-rw-r--r--tests/ui/lint/for_loop_over_fallibles.rs4
-rw-r--r--tests/ui/lint/for_loop_over_fallibles.stderr4
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/ui/lint/for_loop_over_fallibles.rs b/tests/ui/lint/for_loop_over_fallibles.rs
index 76049453126..89ac20c3521 100644
--- a/tests/ui/lint/for_loop_over_fallibles.rs
+++ b/tests/ui/lint/for_loop_over_fallibles.rs
@@ -45,7 +45,7 @@ fn _returns_result() -> Result<(), ()> {
 fn _by_ref() {
     // Shared refs
     for _ in &Some(1) {}
-    //~^ WARN for loop over an `&Option`. This is more readably written as an `if let` statement
+    //~^ WARN for loop over a `&Option`. This is more readably written as an `if let` statement
     //~| HELP to check pattern in a loop use `while let`
     //~| HELP consider using `if let` to clear intent
     for _ in &Ok::<_, ()>(1) {}
@@ -55,7 +55,7 @@ fn _by_ref() {
 
     // Mutable refs
     for _ in &mut Some(1) {}
-    //~^ WARN for loop over an `&mut Option`. This is more readably written as an `if let` statement
+    //~^ WARN for loop over a `&mut Option`. This is more readably written as an `if let` statement
     //~| HELP to check pattern in a loop use `while let`
     //~| HELP consider using `if let` to clear intent
     for _ in &mut Ok::<_, ()>(1) {}
diff --git a/tests/ui/lint/for_loop_over_fallibles.stderr b/tests/ui/lint/for_loop_over_fallibles.stderr
index 00134e468ba..f695de08257 100644
--- a/tests/ui/lint/for_loop_over_fallibles.stderr
+++ b/tests/ui/lint/for_loop_over_fallibles.stderr
@@ -97,7 +97,7 @@ help: consider using `if let` to clear intent
 LL |     if let Ok(_) = Ok::<_, ()>([0; 0]) {}
    |     ~~~~~~~~~~ ~~~
 
-warning: for loop over an `&Option`. This is more readably written as an `if let` statement
+warning: for loop over a `&Option`. This is more readably written as an `if let` statement
   --> $DIR/for_loop_over_fallibles.rs:47:14
    |
 LL |     for _ in &Some(1) {}
@@ -127,7 +127,7 @@ help: consider using `if let` to clear intent
 LL |     if let Ok(_) = &Ok::<_, ()>(1) {}
    |     ~~~~~~~~~~ ~~~
 
-warning: for loop over an `&mut Option`. This is more readably written as an `if let` statement
+warning: for loop over a `&mut Option`. This is more readably written as an `if let` statement
   --> $DIR/for_loop_over_fallibles.rs:57:14
    |
 LL |     for _ in &mut Some(1) {}