lint::unsafe_removed_from_name: fix false positive result when allowed

* Allowing `unsafe_removed_from_name` on imports produces a false
positive on `useless_attribute`.

Fixes: #9197

Signed-off-by: Andy-Python-Programmer <andypythonappdeveloper@gmail.com>
This commit is contained in:
Andy-Python-Programmer 2022-10-05 18:59:01 +11:00
parent 425e1ea73d
commit 14f9f2b69d
No known key found for this signature in database
GPG Key ID: 80E0357347554B89
2 changed files with 5 additions and 1 deletions

View File

@ -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",
)
})
{

View File

@ -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() {}