Skip to content

Commit d86472d

Browse files
committed
Use multiple span_suggestions instead of multipart_suggestion
multipart suggestions aren't autofixable by rustfix yet
1 parent 90da468 commit d86472d

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
@@ -693,14 +693,14 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnitArg {
693693
),
694694
applicability,
695695
);
696-
db.multipart_suggestion(
697-
"...and use unit literals instead",
698-
args_to_recover
699-
.iter()
700-
.map(|arg| (arg.span, "()".to_string()))
701-
.collect::<Vec<_>>(),
702-
applicability,
703-
);
696+
for arg in args_to_recover {
697+
db.span_suggestion(
698+
arg.span,
699+
"...and use unit literals instead",
700+
"()".to_string(),
701+
applicability,
702+
);
703+
}
704704
});
705705
}
706706
},

0 commit comments

Comments
 (0)