]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-pass.rs
Loop over all opaque types instead of looking at just the first one with the same...
[rust.git] / src / test / ui / type-alias-impl-trait / multiple-def-uses-in-one-fn-pass.rs
1 // check-pass
2 #![feature(min_type_alias_impl_trait)]
3
4 type X<A: ToString + Clone, B: ToString + Clone> = impl ToString;
5
6 fn f<A: ToString + Clone, B: ToString + Clone>(a: A, b: B) -> (X<A, B>, X<A, B>) {
7     (a.clone(), a)
8 }
9
10 fn main() {
11     println!("{}", <X<_, _> as ToString>::to_string(&f(42_i32, String::new()).1));
12 }