Skip to content

Commit bfe8d61

Browse files
authored
Merge pull request #278 from dtolnay/arbself
Ignore needless_arbitrary_self_type clippy lint in generated code
2 parents f8e5bb4 + 7bd974b commit bfe8d61

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/expand.rs

+1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ fn lint_suppress_with_body() -> Attribute {
129129
clippy::async_yields_async,
130130
clippy::diverging_sub_expression,
131131
clippy::let_unit_value,
132+
clippy::needless_arbitrary_self_type,
132133
clippy::no_effect_underscore_binding,
133134
clippy::shadow_same,
134135
clippy::type_complexity,

tests/test.rs

+19
Original file line numberDiff line numberDiff line change
@@ -1641,3 +1641,22 @@ pub mod issue266 {
16411641
}
16421642
}
16431643
}
1644+
1645+
// https://github.com/dtolnay/async-trait/issues/277
1646+
pub mod issue277 {
1647+
use async_trait::async_trait;
1648+
1649+
#[async_trait]
1650+
pub trait Trait {
1651+
async fn f(&self);
1652+
}
1653+
1654+
#[async_trait]
1655+
impl Trait for () {
1656+
async fn f(mut self: &Self) {
1657+
g(&mut self);
1658+
}
1659+
}
1660+
1661+
fn g(_: &mut &()) {}
1662+
}

0 commit comments

Comments
 (0)