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
@ -812,14 +812,14 @@ fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr<'_>) {
|
||||
),
|
||||
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…
Reference in New Issue
Block a user