rust/compiler/rustc_resolve/src
Matthias Krüger 946192b25a
Rollup merge of #138886 - samueltardieu:push-xxkzmupznoky, r=jieyouxu
Fix autofix for `self` and `self as …` in `unused_imports` lint

This fixes two problems with the autofixes for the `unused_imports` lint:

- `use std::collections::{HashMap, self as coll};` would suggest, when `HashMap` is unused, the incorrect `use std::collections::self as coll;` which does not compile.
- `use std::borrow::{self, Cow};` would suggest, when `self` is unused, `use std::borrow::{Cow};`, which contains unnecessary brackets.

The first problem was reported in rust-lang/rust-clippy#14450, the second found while fixing the first one.

Fix #133750
(thanks to `@richardsamuels` for spotting the duplicate)
2025-03-25 18:09:06 +01:00
..
late Rollup merge of #138837 - petrochenkov:resinstab2, r=jieyouxu 2025-03-25 15:36:35 +09:00
build_reduced_graph.rs resolve: Avoid some unstable iteration 2 2025-03-24 23:03:11 +03:00
check_unused.rs Fix autofix for self and self as … in unused_imports lint 2025-03-24 13:01:47 +01:00
def_collector.rs Pass Option<Symbol> to def_path_data/create_def methods. 2025-03-07 20:53:00 +11:00
diagnostics.rs resolve: Avoid some unstable iteration 2 2025-03-24 23:03:11 +03:00
effective_visibilities.rs rustc_resolve: reduce rightwards drift with let..else 👉💨 2025-01-21 13:42:32 +00:00
errors.rs Allow builtin macros to be used more than once. 2025-03-19 14:12:47 +01:00
ident.rs resolve: Avoid some unstable iteration 2 2025-03-24 23:03:11 +03:00
imports.rs resolve: Avoid some unstable iteration 2 2025-03-24 23:03:11 +03:00
late.rs Rollup merge of #138837 - petrochenkov:resinstab2, r=jieyouxu 2025-03-25 15:36:35 +09:00
lib.rs resolve: Avoid some unstable iteration 2 2025-03-24 23:03:11 +03:00
macros.rs Rollup merge of #138580 - petrochenkov:resinstab, r=Nadrieril 2025-03-25 15:36:32 +09:00
rustdoc.rs rustdoc: improve refdef handling in the unresolved link lint 2025-02-15 12:21:35 -07:00