Skip to content

Commit 3cc17f0

Browse files
committed
Use multiple span_suggestions instead of multipart_suggestion
multipart suggestions aren't autofixable by rustfix yet
1 parent 2edd619 commit 3cc17f0

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
@@ -667,14 +667,14 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnitArg {
667667
),
668668
applicability,
669669
);
670-
db.multipart_suggestion(
671-
"...and use unit literals instead",
672-
args_to_recover
673-
.iter()
674-
.map(|arg| (arg.span, "()".to_string()))
675-
.collect::<Vec<_>>(),
676-
applicability,
677-
);
670+
for arg in args_to_recover {
671+
db.span_suggestion(
672+
arg.span,
673+
"...and use unit literals instead",
674+
"()".to_string(),
675+
applicability,
676+
);
677+
}
678678
});
679679
}
680680
},

0 commit comments

Comments
 (0)