Skip to content

Commit 3e7121a

Browse files
committed
Use multiple span_suggestions instead of multipart_suggestion
multipart suggestions aren't autofixable by rustfix yet
1 parent 4e4a8b5 commit 3e7121a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

clippy_lints/src/types.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -631,14 +631,14 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnitArg {
631631
),
632632
applicability,
633633
);
634-
db.multipart_suggestion(
635-
"...and use unit literals instead",
636-
args_to_recover
637-
.iter()
638-
.map(|arg| (arg.span, "()".to_string()))
639-
.collect::<Vec<_>>(),
640-
applicability,
641-
);
634+
for arg in args_to_recover {
635+
db.span_suggestion(
636+
arg.span,
637+
"...and use unit literals instead",
638+
"()".to_string(),
639+
applicability,
640+
);
641+
}
642642
});
643643
}
644644
},

0 commit comments

Comments
 (0)