rust/compiler/rustc_resolve
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
..
src Rollup merge of #138886 - samueltardieu:push-xxkzmupznoky, r=jieyouxu 2025-03-25 18:09:06 +01:00
Cargo.toml Revert "Use workspace lints for crates in compiler/ #138084" 2025-03-10 18:12:47 +08:00
messages.ftl Allow builtin macros to be used more than once. 2025-03-19 14:12:47 +01:00