1
Fork 0

check for cycles when unifying const variables

This commit is contained in:
Bastian Kauschke 2020-09-09 09:43:47 +02:00
parent 39245400c5
commit 073127a04f
3 changed files with 237 additions and 14 deletions

View file

@ -689,6 +689,7 @@ impl<'a, 'tcx> Lift<'tcx> for ty::error::TypeError<'a> {
Traits(x) => Traits(x),
VariadicMismatch(x) => VariadicMismatch(x),
CyclicTy(t) => return tcx.lift(&t).map(|t| CyclicTy(t)),
CyclicConst(ct) => return tcx.lift(&ct).map(|ct| CyclicConst(ct)),
ProjectionMismatched(x) => ProjectionMismatched(x),
Sorts(ref x) => return tcx.lift(x).map(Sorts),
ExistentialMismatch(ref x) => return tcx.lift(x).map(ExistentialMismatch),