Skip to content

Commit 9dc0f16

Browse files
committed
Add regression test for issue 152
1 parent 6d3cf66 commit 9dc0f16

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

tests/test.rs

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![cfg_attr(
22
async_trait_nightly_testing,
3-
feature(min_specialization, min_const_generics)
3+
feature(min_specialization, min_const_generics, type_alias_impl_trait)
44
)]
55
#![allow(
66
clippy::let_underscore_drop,
@@ -1278,3 +1278,25 @@ pub mod issue149 {
12781278
}
12791279
}
12801280
}
1281+
1282+
// https://github.com/dtolnay/async-trait/issues/152
1283+
#[cfg(async_trait_nightly_testing)]
1284+
pub mod issue152 {
1285+
use async_trait::async_trait;
1286+
1287+
#[async_trait]
1288+
trait Trait {
1289+
type Assoc;
1290+
1291+
async fn f(&self) -> Self::Assoc;
1292+
}
1293+
1294+
struct Struct;
1295+
1296+
#[async_trait]
1297+
impl Trait for Struct {
1298+
type Assoc = impl Sized;
1299+
1300+
async fn f(&self) -> Self::Assoc {}
1301+
}
1302+
}

0 commit comments

Comments
 (0)