Add a test showing that a similar example compiles

This commit is contained in:
Oli Scherer 2022-02-22 17:20:58 +00:00
parent 7b4f715979
commit e82b0cde4e

View File

@ -0,0 +1,20 @@
// check-pass
trait Duh {}
impl Duh for i32 {}
trait Trait {
type Assoc: Duh;
}
impl<F: Duh> Trait for F {
type Assoc = F;
}
fn foo() -> impl Trait<Assoc = impl Send> {
42
}
fn main() {
}