]>
Commit | Line | Data |
---|---|---|
94222f64 | 1 | #![feature(type_alias_impl_trait)] |
8faf50e0 XL |
2 | |
3 | fn main() {} | |
4 | ||
94222f64 | 5 | type Underconstrained<T: std::fmt::Debug> = impl Send; |
8faf50e0 XL |
6 | |
7 | // not a defining use, because it doesn't define *all* possible generics | |
8 | fn underconstrained<U>(_: U) -> Underconstrained<U> { | |
1b1a35ee | 9 | //~^ ERROR `U` doesn't implement `Debug` |
8faf50e0 XL |
10 | 5u32 |
11 | } | |
12 | ||
94222f64 | 13 | type Underconstrained2<T: std::fmt::Debug> = impl Send; |
8faf50e0 XL |
14 | |
15 | // not a defining use, because it doesn't define *all* possible generics | |
16 | fn underconstrained2<U, V>(_: U, _: V) -> Underconstrained2<V> { | |
1b1a35ee | 17 | //~^ ERROR `V` doesn't implement `Debug` |
8faf50e0 XL |
18 | 5u32 |
19 | } |