Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore unused_qualifications rustc lint in generated code #260

Merged
merged 3 commits into from
Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading