The equality check performed at the beginning of subtype checking:
|
if t1 == t2 { |
|
return Ok(()); |
|
} |
should only do a cheap check for "physical" equality (using
ptr_eq on anything non-primitive).
Otherwise we do full traversals of complex nested types at every level (quadratic).