summaryrefslogtreecommitdiffstats
path: root/src/test/ui/type-alias-impl-trait/nested.rs
blob: 6b866be7d173f1033faa961b3c5f711313c66cf4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![feature(type_alias_impl_trait)]

type Foo = impl std::fmt::Debug;
type Bar = impl Trait<Foo>;

trait Trait<T> {}

impl<T, U> Trait<T> for U {}

fn bar() -> Bar {
    42
}

fn main() {
    println!("{:?}", bar());
    //~^ ERROR `Bar` doesn't implement `Debug`
}