Skip to content

Commit

Permalink
Use multiple span_suggestions instead of multipart_suggestion
Browse files Browse the repository at this point in the history
multipart suggestions aren't autofixable by rustfix yet
  • Loading branch information
flip1995 committed Dec 28, 2019
1 parent 2edd619 commit 3cc17f0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions clippy_lints/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -667,14 +667,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,
);
}
});
}
},
Expand Down

0 comments on commit 3cc17f0

Please sign in to comment.