Skip to content

Commit b53b4e7

Browse files
committed
Add regression test for issue 277
warning: the type of the `self` parameter does not need to be arbitrary --> tests/test.rs:1656:24 | 1656 | async fn f(mut self: &Self) { | ^^^^^^^^^^^ help: consider to change this parameter to: `&'life0 self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type = note: `#[warn(clippy::needless_arbitrary_self_type)]` on by default
1 parent f8e5bb4 commit b53b4e7

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

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)