about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-11-03 16:30:21 +0000
committerbors <bors@rust-lang.org>2022-11-03 16:30:21 +0000
commit704e00cb75ef5be2080d21be0965afd938d6fbec (patch)
tree09d8bd76c34b11569e14f1eb650f88f7215b90ca
parent6b4e7dd547b556400863501603bad8373f4ad761 (diff)
parent05006e58c08d24bf6f7fbe2eca96f3e82d355e26 (diff)
downloadrust-704e00cb75ef5be2080d21be0965afd938d6fbec.tar.gz
rust-704e00cb75ef5be2080d21be0965afd938d6fbec.zip
Auto merge of #9779 - koka831:fix/unnecessary-join-message, r=Jarcho
fix turbofish in suggest message

changelog: [`unnecessary_join`] fix turbofish in suggest message
-rw-r--r--clippy_lints/src/methods/unnecessary_join.rs2
-rw-r--r--tests/ui/unnecessary_join.stderr4
2 files changed, 3 insertions, 3 deletions
diff --git a/clippy_lints/src/methods/unnecessary_join.rs b/clippy_lints/src/methods/unnecessary_join.rs
index 973b8a7e6bf..33efa16c300 100644
--- a/clippy_lints/src/methods/unnecessary_join.rs
+++ b/clippy_lints/src/methods/unnecessary_join.rs
@@ -31,7 +31,7 @@ pub(super) fn check<'tcx>(
                 cx,
                 UNNECESSARY_JOIN,
                 span.with_hi(expr.span.hi()),
-                r#"called `.collect<Vec<String>>().join("")` on an iterator"#,
+                r#"called `.collect::<Vec<String>>().join("")` on an iterator"#,
                 "try using",
                 "collect::<String>()".to_owned(),
                 applicability,
diff --git a/tests/ui/unnecessary_join.stderr b/tests/ui/unnecessary_join.stderr
index 0b14b143aff..e919a6d1d8a 100644
--- a/tests/ui/unnecessary_join.stderr
+++ b/tests/ui/unnecessary_join.stderr
@@ -1,4 +1,4 @@
-error: called `.collect<Vec<String>>().join("")` on an iterator
+error: called `.collect::<Vec<String>>().join("")` on an iterator
   --> $DIR/unnecessary_join.rs:11:10
    |
 LL |           .collect::<Vec<String>>()
@@ -8,7 +8,7 @@ LL | |         .join("");
    |
    = note: `-D clippy::unnecessary-join` implied by `-D warnings`
 
-error: called `.collect<Vec<String>>().join("")` on an iterator
+error: called `.collect::<Vec<String>>().join("")` on an iterator
   --> $DIR/unnecessary_join.rs:20:10
    |
 LL |           .collect::<Vec<_>>()