Add a test showing that a similar example compiles
This commit is contained in:
parent
7b4f715979
commit
e82b0cde4e
1 changed files with 20 additions and 0 deletions
20
src/test/ui/impl-trait/nested-return-type3.rs
Normal file
20
src/test/ui/impl-trait/nested-return-type3.rs
Normal 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() {
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue