Skip to content

Commit b3fdf43

Browse files
committed
Add regression test for issue 154
1 parent 926aeb5 commit b3fdf43

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/test.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,3 +1300,25 @@ pub mod issue152 {
13001300
async fn f(&self) -> Self::Assoc {}
13011301
}
13021302
}
1303+
1304+
// https://github.com/dtolnay/async-trait/issues/154
1305+
pub mod issue154 {
1306+
#![deny(clippy::items_after_statements)]
1307+
1308+
use async_trait::async_trait;
1309+
1310+
#[async_trait]
1311+
pub trait MyTrait {
1312+
async fn f(&self);
1313+
}
1314+
1315+
pub struct Struct;
1316+
1317+
#[async_trait]
1318+
impl MyTrait for Struct {
1319+
async fn f(&self) {
1320+
const MAX: u16 = 128;
1321+
println!("{}", MAX);
1322+
}
1323+
}
1324+
}

0 commit comments

Comments
 (0)