about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-03-03 22:56:13 +0100
committerGitHub <noreply@github.com>2024-03-03 22:56:13 +0100
commited6d17523ac9de0237de47af70bf917e71d71f7f (patch)
tree2ad6edfff40a861d9cc24b4d4c1cced4bc1c5a3e /compiler/rustc_codegen_gcc
parentd37ad03513ba02eb1bf634b1fa77187adb10a607 (diff)
parent4ea9f72c72cb2fbe210f1141aea4a85aea3ef6d1 (diff)
downloadrust-ed6d17523ac9de0237de47af70bf917e71d71f7f.tar.gz
rust-ed6d17523ac9de0237de47af70bf917e71d71f7f.zip
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
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions