Automatic has-same-types testing methodology can be found in #22501. Because most of them don't work with `--pretty=typed`, compile-fail tests were manually audited. r? @aturon