Skip to content

Commit

Permalink
Fix known-known const unification case
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed May 1, 2019
1 parent 97c0c66 commit b872e63
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/librustc/infer/unify_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit b872e63

Please sign in to comment.