Skip to content

Commit

Permalink
Merge pull request #260 from dtolnay/qualifications
Browse files Browse the repository at this point in the history
Ignore unused_qualifications rustc lint in generated code
  • Loading branch information
dtolnay committed Mar 16, 2024
2 parents 62969d5 + 75879e8 commit e68d68c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ pub fn expand(input: &mut Item, is_local: bool) {
fn lint_suppress_with_body() -> Attribute {
parse_quote! {
#[allow(
unused_qualifications,
clippy::async_yields_async,
clippy::diverging_sub_expression,
clippy::let_unit_value,
Expand All @@ -140,6 +141,7 @@ fn lint_suppress_with_body() -> Attribute {
fn lint_suppress_without_body() -> Attribute {
parse_quote! {
#[allow(
unused_qualifications,
clippy::type_complexity,
clippy::type_repetition_in_bounds
)]
Expand Down
3 changes: 2 additions & 1 deletion tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
async_trait_nightly_testing,
feature(impl_trait_in_assoc_type, min_specialization)
)]
#![deny(rust_2021_compatibility)]
#![deny(rust_2021_compatibility, unused_qualifications)]
#![allow(
clippy::incompatible_msrv, // https://github.com/rust-lang/rust-clippy/issues/12257
clippy::let_underscore_untyped,
Expand Down Expand Up @@ -1384,6 +1384,7 @@ pub mod issue169 {
use async_trait::async_trait;

#[async_trait]
#[allow(unused_qualifications)]
pub trait Trait: ::core::marker::Sync {
async fn f(&self) {}
}
Expand Down

0 comments on commit e68d68c

Please sign in to comment.