Fix known-known const unification case

This commit is contained in:
varkor 2019-04-17 22:53:23 +01:00
parent 97c0c6653b
commit b872e63585

View File

@ -134,10 +134,7 @@ impl<'tcx> UnifyValue for ConstVarValue<'tcx> {
ConstVariableValue::Known { value: value1 },
ConstVariableValue::Known { value: value2 }
) => {
match <&'tcx ty::Const<'tcx>>::unify_values(&value1, &value2) {
Ok(value) => Ok(ConstVariableValue::Known { value }),
Err(err) => Err(err),
}
bug!("equating two const variables, both of which have known values")
}
// If one side is known, prefer that one.