Skip to content

Commit

Permalink
Add regression test for issue 152
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Mar 7, 2021
1 parent 6d3cf66 commit 9dc0f16
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion tests/test.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![cfg_attr(
async_trait_nightly_testing,
feature(min_specialization, min_const_generics)
feature(min_specialization, min_const_generics, type_alias_impl_trait)
)]
#![allow(
clippy::let_underscore_drop,
Expand Down Expand Up @@ -1278,3 +1278,25 @@ pub mod issue149 {
}
}
}

// https://github.com/dtolnay/async-trait/issues/152
#[cfg(async_trait_nightly_testing)]
pub mod issue152 {
use async_trait::async_trait;

#[async_trait]
trait Trait {
type Assoc;

async fn f(&self) -> Self::Assoc;
}

struct Struct;

#[async_trait]
impl Trait for Struct {
type Assoc = impl Sized;

async fn f(&self) -> Self::Assoc {}
}
}

0 comments on commit 9dc0f16

Please sign in to comment.