about summary refs log tree commit diff
diff options
context:
space:
mode:
authorflip1995 <hello@philkrones.com>2019-08-26 21:43:29 +0200
committerflip1995 <hello@philkrones.com>2020-05-31 18:48:29 +0200
commita1a1a4b82a35b810570dbf7d2ee7f00896bee232 (patch)
treefd485be73cd6ed083d32a1cd1bc523fa420ebf7f
parent380d941a045dc213ae28807d74fc32d1b1841e22 (diff)
downloadrust-a1a1a4b82a35b810570dbf7d2ee7f00896bee232.tar.gz
rust-a1a1a4b82a35b810570dbf7d2ee7f00896bee232.zip
Use multiple span_suggestions instead of multipart_suggestion
multipart suggestions aren't autofixable by rustfix yet
-rw-r--r--clippy_lints/src/types.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/clippy_lints/src/types.rs b/clippy_lints/src/types.rs
index 8fcca4b7bb9..3fbea77757d 100644
--- a/clippy_lints/src/types.rs
+++ b/clippy_lints/src/types.rs
@@ -812,14 +812,14 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnitArg {
                             ),
                             applicability,
                         );
-                        db.multipart_suggestion(
-                            "...and use unit literals instead",
-                            args_to_recover
-                                .iter()
-                                .map(|arg| (arg.span, "()".to_string()))
-                                .collect::<Vec<_>>(),
-                            applicability,
-                        );
+                        for arg in args_to_recover {
+                            db.span_suggestion(
+                                arg.span,
+                                "...and use unit literals instead",
+                                "()".to_string(),
+                                applicability,
+                            );
+                        }
                     });
                 }
             },