diff options
| author | flip1995 <hello@philkrones.com> | 2019-08-26 21:43:29 +0200 |
|---|---|---|
| committer | flip1995 <hello@philkrones.com> | 2020-05-31 18:48:29 +0200 |
| commit | a1a1a4b82a35b810570dbf7d2ee7f00896bee232 (patch) | |
| tree | fd485be73cd6ed083d32a1cd1bc523fa420ebf7f | |
| parent | 380d941a045dc213ae28807d74fc32d1b1841e22 (diff) | |
| download | rust-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.rs | 16 |
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, + ); + } }); } }, |
