]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-alias-impl-trait/generic_duplicate_param_use9.rs
Rollup merge of #106766 - GuillaumeGomez:rm-stripper-dead-code, r=notriddle
[rust.git] / tests / ui / type-alias-impl-trait / generic_duplicate_param_use9.rs
1 #![feature(type_alias_impl_trait)]
2
3 use std::fmt::Debug;
4
5 fn main() {}
6
7 type Two<A, B> = impl Debug;
8
9 trait Foo {
10     type Bar: Debug;
11     const BAR: Self::Bar;
12 }
13
14 fn two<T: Debug + Foo, U: Debug>(t: T, u: U) -> Two<T, U> {
15     (t, u, T::BAR)
16     //~^ ERROR the trait bound `A: Foo` is not satisfied
17     //~| ERROR `A` doesn't implement `Debug`
18     //~| ERROR `B` doesn't implement `Debug`
19 }
20
21 fn three<T: Debug, U: Debug>(t: T, u: U) -> Two<T, U> {
22     (t, u, 42)
23     //~^ ERROR `A` doesn't implement `Debug`
24     //~| ERROR `B` doesn't implement `Debug`
25 }