What's the output of this code?
trait PrintComponents {
fn print_components();
}
impl<T> PrintComponents for CxRaw<(T,)> {
fn print_components(&self) {
print!("1");
}
}
impl<T, U> PrintComponents for CxRaw<(T, U)> {
fn print_components(&self) {
print!("2");
}
}
let closure = |x, y| {
// we start out knowing nothing about the relation between x and y's type
Cx::new((x, y)).print_components();
[&x, &y]; // x and y now known to have the same type
Cx::new((x, y)).print_components();
};
closure((), ());