Rollup merge of #108202 - compiler-errors:non_lifetime_binders-type-match-ice, r=davidtwco
Make sure `test_type_match` doesn't ICE with late-bound types Fixes #108190 (in a kind of hacky way, anyways doesn't really matter)
This commit is contained in:
commit
8a5843f07f
3 changed files with 27 additions and 1 deletions
|
@ -186,7 +186,8 @@ impl<'tcx> TypeRelation<'tcx> for Match<'tcx> {
|
|||
|
||||
#[instrument(skip(self), level = "debug")]
|
||||
fn tys(&mut self, pattern: Ty<'tcx>, value: Ty<'tcx>) -> RelateResult<'tcx, Ty<'tcx>> {
|
||||
if let ty::Error(_) = pattern.kind() {
|
||||
// FIXME(non_lifetime_binders): What to do here?
|
||||
if matches!(pattern.kind(), ty::Error(_) | ty::Bound(..)) {
|
||||
// Unlike normal `TypeRelation` rules, `ty::Error` does not equal any type.
|
||||
self.no_match()
|
||||
} else if pattern == value {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue