Skip to content

Commit

Permalink
Auto merge of rust-lang#9593 - Andy-Python-Programmer:master, r=llogiq
Browse files Browse the repository at this point in the history
lint::unsafe_removed_from_name: fix false positive result when allowed

changelog: [`unsafe_removed_from_name`] Fix allowing on imports produces a false positive on `useless_attribute`.

Fixes: rust-lang#9197

Signed-off-by: Andy-Python-Programmer <[email protected]>
  • Loading branch information
bors committed Oct 6, 2022
2 parents 6dd0c3a + 14f9f2b commit 8f1ebdd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clippy_lints/src/attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,8 @@ impl<'tcx> LateLintPass<'tcx> for Attributes {
"wildcard_imports"
| "enum_glob_use"
| "redundant_pub_crate"
| "macro_use_imports",
| "macro_use_imports"
| "unsafe_removed_from_name",
)
})
{
Expand Down
3 changes: 3 additions & 0 deletions tests/ui/unsafe_removed_from_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@ use mod_with_some_unsafe_things::Unsafe as LieAboutModSafety;
use mod_with_some_unsafe_things::Safe as IPromiseItsSafeThisTime;
use mod_with_some_unsafe_things::Unsafe as SuperUnsafeModThing;

#[allow(clippy::unsafe_removed_from_name)]
use mod_with_some_unsafe_things::Unsafe as SuperSafeThing;

fn main() {}

0 comments on commit 8f1ebdd

Please sign in to comment.