Use multiple span_suggestions instead of multipart_suggestion
multipart suggestions aren't autofixable by rustfix yet
This commit is contained in:
parent
380d941a04
commit
a1a1a4b82a
1 changed files with 8 additions and 8 deletions
|
|
@ -812,14 +812,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,
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue