Use multiple span_suggestions instead of multipart_suggestion

multipart suggestions aren't autofixable by rustfix yet
This commit is contained in:
flip1995 2019-08-26 21:43:29 +02:00
parent 380d941a04
commit a1a1a4b82a
No known key found for this signature in database
GPG Key ID: 693086869D506637

View File

@ -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,
);
}
});
}
},