Commit d4dea4b
authored
Fix false positive in useless_attribute with redundant_imports (rust-lang#15318)
Fix false positive in `useless_attribute` with `redundant_imports`
Add `redundant_imports` to the list of allowed lints on use items to
prevent
`useless_attribute` from triggering false positives when
`#[expect(redundant_imports)]`
or similar attributes are used on use statements.
fixes rust-lang/rust-clippy#15316
---
changelog: [`useless_attribute`]: fix false positive when using
`#[expect(redundant_imports)]` and similar lint attributes on `use`
statementsFile tree
4 files changed
+26
-0
lines changed- clippy_lints/src/attrs
- clippy_utils/src
- tests/ui
4 files changed
+26
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| 264 | + | |
264 | 265 | | |
265 | 266 | | |
266 | 267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
0 commit comments