diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-03-17 14:04:15 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-17 14:04:15 +0100 |
| commit | 12137462b45d9b3287155e80883ae9251a6cea55 (patch) | |
| tree | 7dd6716752eb32c394440f0bf06d39f3ec594ac7 /compiler | |
| parent | 2448162729799a7459e06788757dd7e3479aad50 (diff) | |
| parent | b8db431f37e097a545f364335fdcd5f65c056cb7 (diff) | |
| download | rust-12137462b45d9b3287155e80883ae9251a6cea55.tar.gz rust-12137462b45d9b3287155e80883ae9251a6cea55.zip | |
Rollup merge of #122633 - matthiaskrgr:col, r=fmease
avoid unnecessary collect()
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/astconv/errors.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_hir_analysis/src/astconv/errors.rs b/compiler/rustc_hir_analysis/src/astconv/errors.rs index 37fbf45235a..68896768e8d 100644 --- a/compiler/rustc_hir_analysis/src/astconv/errors.rs +++ b/compiler/rustc_hir_analysis/src/astconv/errors.rs @@ -408,10 +408,7 @@ impl<'tcx> dyn AstConv<'tcx> + '_ { traits with associated type `{name}`, you could use the \ fully-qualified path", ), - traits - .iter() - .map(|trait_str| format!("<Example as {trait_str}>::{name}")) - .collect::<Vec<_>>(), + traits.iter().map(|trait_str| format!("<Example as {trait_str}>::{name}")), Applicability::HasPlaceholders, ); } |
