Fix header

This commit is contained in:
blyxyas 2023-05-08 18:38:41 +02:00
parent ba0e7e88cb
commit 4c3e2ff2a4
No known key found for this signature in database
GPG Key ID: 4D38170B5A2FC334
2 changed files with 2 additions and 10 deletions

View File

@ -102,7 +102,6 @@ declare_clippy_lint! {
pub struct WildcardImports {
warn_on_all: bool,
test_modules_deep: u32,
ignore: bool,
}
impl WildcardImports {
@ -110,7 +109,6 @@ impl WildcardImports {
Self {
warn_on_all,
test_modules_deep: 0,
ignore: false,
}
}
}
@ -118,14 +116,8 @@ impl WildcardImports {
impl_lint_pass!(WildcardImports => [ENUM_GLOB_USE, WILDCARD_IMPORTS]);
impl LateLintPass<'_> for WildcardImports {
fn check_crate(&mut self, cx: &LateContext<'_>) {
if cx.sess().opts.test {
self.ignore = true;
}
}
fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) {
if self.ignore {
if cx.sess().is_test_crate() {
return;
}

View File

@ -1,4 +1,4 @@
// compile-flags: --test
//@compile-flags: --test
#![warn(clippy::wildcard_imports)]
#![allow(unused, clippy::unnecessary_wraps, clippy::let_unit_value)]