2 // Regression test for #31849: the problem here was actually a performance
3 // cliff, but I'm adding the test for reference.
9 impl<S1, S2, T1, T2> Upcast<(T1, T2)> for (S1,S2)
13 fn upcast(self) -> (T1, T2) { (self.0.upcast(), self.1.upcast()) }
16 impl Upcast<()> for ()
18 fn upcast(self) -> () { () }
23 fn to_static(self) -> Self::Static where Self: Sized;
26 impl<T, U> ToStatic for (T, U)
30 type Static = (T::Static, U::Static);
31 fn to_static(self) -> Self::Static { (self.0.to_static(), self.1.to_static()) }
37 fn to_static(self) -> () { () }
43 fn build(&self) -> Self::Output;
46 impl<S,T> Factory for (S, T)
50 <S::Output as ToStatic>::Static: Upcast<S::Output>,
52 type Output = (S::Output, T::Output);
53 fn build(&self) -> Self::Output { (self.0.build().to_static().upcast(), self.1.build()) }
58 fn build(&self) -> Self::Output { () }
62 // More parens, more time.
63 let it = ((((((((((),()),()),()),()),()),()),()),()),());