avoid collecting into vecs in some places
This commit is contained in:
parent
2e3581bca9
commit
7a48987006
5 changed files with 20 additions and 33 deletions
|
@ -1884,10 +1884,7 @@ impl<'a: 'ast, 'ast, 'tcx> LateResolutionVisitor<'a, '_, 'ast, 'tcx> {
|
|||
err.span_suggestions_with_style(
|
||||
path_span.shrink_to_hi().with_hi(call_span.hi()),
|
||||
"you might have meant to use an associated function to build this type",
|
||||
items
|
||||
.iter()
|
||||
.map(|(_, name, len)| suggestion(name, *len))
|
||||
.collect::<Vec<String>>(),
|
||||
items.iter().map(|(_, name, len)| suggestion(name, *len)),
|
||||
Applicability::MaybeIncorrect,
|
||||
SuggestionStyle::ShowAlways,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue