Repository: dtolnay/async-trait (rust)

Issue:
Using async-trait with nightly-2024-03-04 triggers `unused-qualifications` lint
Consider the following code:

```rust
use async_trait::async_trait;  // async-trait = "0.1.77"

#[async_trait]
pub trait Foo {
    async fn foo(&self);
}

pub struct Bar;

#[async_trait]
impl Foo for Bar {
    async fn foo(&self) {
        todo!()
    }
}
```

with the following in `Cargo.toml`:

```toml
[lints.rust]
unused_qualifications = "deny"
```

Using the current nightly channel (d18480b84 2024-03-04), running `cargo +nightly check` on the above fails with:

```text
error: unnecessary qualification
 --> src/lib.rs:5:5
  |
5 |     async fn foo(&self);
  |     ^^^^^
  |
  = note: requested on the command line with `-D unused-qualifications`
help: remove the unnecessary path segments
  |
5 |     async fn foo(&self);
  |

error: unnecessary qualification
  --> src/lib.rs:12:5
   |
12 |     async fn foo(&self) {
   |     ^^^^^
   |
help: remove the unnecessary path segments
   |
12 |     async fn foo(&self) {
   |

error: could not compile `unused-qual` (lib) due to 2 previous errors
```

Pull request description:
Ignore unused_qualifications rustc lint in generated code
Fixes #259. The new lints in nightly-2024-03-05 are resulting from https://github.com/rust-lang/rust/pull/121528.

Patch:
diff --git a/src/expand.rs b/src/expand.rs
index 2a8b3c2..cbef6f2 100644
--- a/src/expand.rs
+++ b/src/expand.rs
@@ -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,
@@ -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
         )]


Test patch:
diff --git a/tests/test.rs b/tests/test.rs
index cbd8e03..4b01bad 100644
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -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,
@@ -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) {}
     }