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 Aug 28, 2019
1 parent 648036b commit c78f1dc
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 @@ -631,14 +631,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 c78f1dc

Please sign in to comment.