1 // Regression test for #31849: the problem here was actually a performance
2 // cliff, but I'm adding the test for reference.
8 impl<S1, S2, T1, T2> Upcast<(T1, T2)> for (S1,S2)
12 fn upcast(self) -> (T1, T2) { (self.0.upcast(), self.1.upcast()) }
15 impl Upcast<()> for ()
17 fn upcast(self) -> () { () }
22 fn to_static(self) -> Self::Static where Self: Sized;
25 impl<T, U> ToStatic for (T, U)
29 type Static = (T::Static, U::Static);
30 fn to_static(self) -> Self::Static { (self.0.to_static(), self.1.to_static()) }
36 fn to_static(self) -> () { () }
42 fn build(&self) -> Self::Output;
45 impl<S,T> Factory for (S, T)
49 <S::Output as ToStatic>::Static: Upcast<S::Output>,
51 type Output = (S::Output, T::Output);
52 fn build(&self) -> Self::Output { (self.0.build().to_static().upcast(), self.1.build()) }
57 fn build(&self) -> Self::Output { () }
61 // More parens, more time.
62 let it = ((((((((((),()),()),()),()),()),()),()),()),());