Allow unused_imports, and unused_import_braces on use

This commit is contained in:
MarcusGrass 2024-02-22 21:53:04 +01:00
parent 341ae30a85
commit 97a3ac5b86
No known key found for this signature in database
GPG Key ID: B3F995FE064E3AA9
3 changed files with 18 additions and 0 deletions

View File

@ -564,6 +564,8 @@ impl<'tcx> LateLintPass<'tcx> for Attributes {
|| is_word(lint, sym::deprecated)
|| is_word(lint, sym!(unreachable_pub))
|| is_word(lint, sym!(unused))
|| is_word(lint, sym!(unused_import_braces))
|| is_word(lint, sym!(unused_imports))
|| extract_clippy_lint(lint).map_or(false, |s| {
matches!(
s.as_str(),

View File

@ -80,6 +80,14 @@ pub mod split {
#[allow(clippy::single_component_path_imports)]
use regex;
mod module {
pub(crate) struct Struct;
}
#[rustfmt::skip]
#[allow(unused_import_braces, unused_imports)]
use module::{Struct};
fn main() {
test_indented_attr();
}

View File

@ -80,6 +80,14 @@ pub mod split {
#[allow(clippy::single_component_path_imports)]
use regex;
mod module {
pub(crate) struct Struct;
}
#[rustfmt::skip]
#[allow(unused_import_braces, unused_imports)]
use module::{Struct};
fn main() {
test_indented_attr();
}