Skip to content

Commit 0d5f4f4

Browse files
committed
Use multiple span_suggestions instead of multipart_suggestion
multipart suggestions aren't autofixable by rustfix yet
1 parent a02d6f7 commit 0d5f4f4

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
@@ -665,14 +665,14 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnitArg {
665665
),
666666
applicability,
667667
);
668-
db.multipart_suggestion(
669-
"...and use unit literals instead",
670-
args_to_recover
671-
.iter()
672-
.map(|arg| (arg.span, "()".to_string()))
673-
.collect::<Vec<_>>(),
674-
applicability,
675-
);
668+
for arg in args_to_recover {
669+
db.span_suggestion(
670+
arg.span,
671+
"...and use unit literals instead",
672+
"()".to_string(),
673+
applicability,
674+
);
675+
}
676676
});
677677
}
678678
},

0 commit comments

Comments
 (0)