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 Nov 25, 2019
1 parent a02d6f7 commit 0d5f4f4
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 @@ -665,14 +665,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 0d5f4f4

Please sign in to comment.