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

type Foo<T> = impl Default;

#[allow(unused)]
fn foo<T: Default>(t: T) -> Foo<T> {
    t
    //~^ ERROR: the trait bound `T: Default` is not satisfied
}

struct NotDefault;

fn main() {
    let _ = Foo::<NotDefault>::default();
}