]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.rs
Auto merge of #82980 - tmiasko:import-cold-multiplier, r=michaelwoerister
[rust.git] / src / test / ui / type-alias-impl-trait / generic_duplicate_param_use2.rs
1 // revisions: min_tait full_tait
2 #![feature(min_type_alias_impl_trait)]
3 #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
4 //[full_tait]~^ WARN incomplete
5
6 use std::fmt::Debug;
7
8 fn main() {}
9
10 // test that unused generic parameters are ok
11 type Two<T, U> = impl Debug;
12
13 fn one<T: Debug>(t: T) -> Two<T, T> {
14     //~^ ERROR non-defining opaque type use in defining scope
15     t
16 }
17
18 fn two<T: Debug, U>(t: T, _: U) -> Two<T, U> {
19     t
20 }