]>
Commit | Line | Data |
---|---|---|
94222f64 | 1 | #![feature(type_alias_impl_trait)] |
29967ef6 XL |
2 | |
3 | type Foo<T> = impl Default; | |
29967ef6 XL |
4 | |
5 | #[allow(unused)] | |
6 | fn foo<T: Default>(t: T) -> Foo<T> { | |
7 | t | |
04454e1e | 8 | //~^ ERROR: the trait bound `T: Default` is not satisfied |
29967ef6 XL |
9 | } |
10 | ||
11 | struct NotDefault; | |
12 | ||
13 | fn main() { | |
14 | let _ = Foo::<NotDefault>::default(); | |
15 | } |