]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.rs
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / ui / type-alias-impl-trait / generic_duplicate_param_use3.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 9
9fa01778
XL
10fn two<T: Debug, U>(t: T, _: U) -> Two<T, U> {
11 t
04454e1e 12 //~^ ERROR `T` doesn't implement `Debug`
9fa01778
XL
13}
14
15fn three<T, U: Debug>(_: T, u: U) -> Two<T, U> {
9fa01778 16 u
04454e1e 17 //~^ ERROR `U` doesn't implement `Debug`
9fa01778 18}