]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.rs
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / ui / type-alias-impl-trait / generic_duplicate_param_use5.rs
CommitLineData
94222f64 1#![feature(type_alias_impl_trait)]
9fa01778
XL
2
3use std::fmt::Debug;
4
5fn main() {}
6
7// test that unused generic parameters are ok
416331ca 8type Two<T, U> = impl Debug;
9fa01778
XL
9
10fn 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
16fn 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}