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 Feb 6, 2020
1 parent 90da468 commit d86472d
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 @@ -693,14 +693,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 d86472d

Please sign in to comment.