about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2025-08-04 14:51:12 +0000
committerGitHub <noreply@github.com>2025-08-04 14:51:12 +0000
commitd6cf7b905fcc49729110fb1f4117bdd1803e1ddd (patch)
treeb6dff60908b2167fddc0c0eba7488ac8b4cff32f
parent048e8f2d0196a4af2699f3615dcbc10b2de1828f (diff)
parent5b22c0c1edeee30f59b5e3e015f5a2279add821b (diff)
downloadrust-d6cf7b905fcc49729110fb1f4117bdd1803e1ddd.tar.gz
rust-d6cf7b905fcc49729110fb1f4117bdd1803e1ddd.zip
Remove rogue comma from infallible_try_from lint message (#15409)
Spotted while reading through the new lints in the changelog for Clippy
1.89:

```
 1 | error: infallible TryFrom impl; consider implementing From, instead
   |                                                           ^ this comma looks out of place
```

---

changelog: [`infallible_try_from`]: Fix a typo in the lint message
-rw-r--r--clippy_lints/src/infallible_try_from.rs2
-rw-r--r--tests/ui/infallible_try_from.stderr4
2 files changed, 3 insertions, 3 deletions
diff --git a/clippy_lints/src/infallible_try_from.rs b/clippy_lints/src/infallible_try_from.rs
index aa6fc78dbbc..589c294a678 100644
--- a/clippy_lints/src/infallible_try_from.rs
+++ b/clippy_lints/src/infallible_try_from.rs
@@ -71,7 +71,7 @@ impl<'tcx> LateLintPass<'tcx> for InfallibleTryFrom {
                     cx,
                     INFALLIBLE_TRY_FROM,
                     span,
-                    "infallible TryFrom impl; consider implementing From, instead",
+                    "infallible TryFrom impl; consider implementing From instead",
                 );
             }
         }
diff --git a/tests/ui/infallible_try_from.stderr b/tests/ui/infallible_try_from.stderr
index 705b1188489..d1e0d9e7d3b 100644
--- a/tests/ui/infallible_try_from.stderr
+++ b/tests/ui/infallible_try_from.stderr
@@ -1,4 +1,4 @@
-error: infallible TryFrom impl; consider implementing From, instead
+error: infallible TryFrom impl; consider implementing From instead
   --> tests/ui/infallible_try_from.rs:8:1
    |
 LL | impl TryFrom<i8> for MyStruct {
@@ -10,7 +10,7 @@ LL |     type Error = !;
    = note: `-D clippy::infallible-try-from` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::infallible_try_from)]`
 
-error: infallible TryFrom impl; consider implementing From, instead
+error: infallible TryFrom impl; consider implementing From instead
   --> tests/ui/infallible_try_from.rs:16:1
    |
 LL | impl TryFrom<i16> for MyStruct {