mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
Add a test showing that a similar example compiles
This commit is contained in:
parent
7b4f715979
commit
e82b0cde4e
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…
Reference in New Issue
Block a user