]>
Commit | Line | Data |
---|---|---|
94222f64 | 1 | #![feature(type_alias_impl_trait)] |
9fa01778 XL |
2 | |
3 | use std::fmt::Debug; | |
4 | ||
5 | fn main() {} | |
6 | ||
7 | // test that unused generic parameters are ok | |
416331ca | 8 | type Two<T, U> = impl Debug; |
9fa01778 XL |
9 | |
10 | fn two<T: Debug, U: Debug>(t: T, u: U) -> Two<T, U> { | |
11 | (t, u) | |
04454e1e FG |
12 | //~^ ERROR `T` doesn't implement `Debug` |
13 | //~| ERROR `U` doesn't implement `Debug` | |
9fa01778 XL |
14 | } |
15 | ||
16 | fn three<T: Debug, U: Debug>(t: T, u: U) -> Two<T, U> { | |
9fa01778 | 17 | (u, t) |
04454e1e FG |
18 | //~^ ERROR `T` doesn't implement `Debug` |
19 | //~| ERROR `U` doesn't implement `Debug` | |
9fa01778 | 20 | } |