rust/compiler/rustc_resolve
Matthias Krüger ed6d17523a
Rollup merge of #121528 - Alexendoo:unused_qualifications, r=petrochenkov
Consider middle segments of paths in `unused_qualifications`

Currently `unused_qualifications` looks at the last segment of a path to see if it can be trimmed, this PR extends the check to the middle segments also

```rust
// currently linted
use std::env::args();
std::env::args(); // Removes `std::env::`
```
```rust
// newly linted
use std::env;
std::env::args(); // Removes `std::`
```

Paths with generics in them are now linted as long as the part being trimmed is before any generic args, e.g. it will now suggest trimming `std::vec::` from `std::vec::Vec<usize>`

Paths with any segments that are from an expansion are no longer linted

Fixes #100979
Fixes #96698
2024-03-03 22:56:13 +01:00
..
src Rollup merge of #121528 - Alexendoo:unused_qualifications, r=petrochenkov 2024-03-03 22:56:13 +01:00
Cargo.toml Update pulldown-cmark version to 0.9.5 2024-01-29 14:14:03 +01:00
messages.ftl Remove unused fluent messages 2024-03-01 09:59:44 +08:00