return when obligation has references_error

This commit is contained in:
Takayuki Maeda
2022-10-03 14:17:42 +09:00
parent 65445a571c
commit 82510b90c6

View File

@@ -899,6 +899,10 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
return;
}
if obligation.references_error() {
return;
}
candidates.vec.push(TransmutabilityCandidate);
}