Skip to content

Commit

Permalink
Merge pull request #278 from dtolnay/arbself
Browse files Browse the repository at this point in the history
Ignore needless_arbitrary_self_type clippy lint in generated code
  • Loading branch information
dtolnay authored Sep 24, 2024
2 parents f8e5bb4 + 7bd974b commit bfe8d61
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ fn lint_suppress_with_body() -> Attribute {
clippy::async_yields_async,
clippy::diverging_sub_expression,
clippy::let_unit_value,
clippy::needless_arbitrary_self_type,
clippy::no_effect_underscore_binding,
clippy::shadow_same,
clippy::type_complexity,
Expand Down
19 changes: 19 additions & 0 deletions tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1641,3 +1641,22 @@ pub mod issue266 {
}
}
}

// https://github.com/dtolnay/async-trait/issues/277
pub mod issue277 {
use async_trait::async_trait;

#[async_trait]
pub trait Trait {
async fn f(&self);
}

#[async_trait]
impl Trait for () {
async fn f(mut self: &Self) {
g(&mut self);
}
}

fn g(_: &mut &()) {}
}

0 comments on commit bfe8d61

Please sign in to comment.