Rollup merge of #102128 - oli-obk:const_unification, r=lcnr

Const unification is already infallible, remove the error handling logic

r? `@lcnr`

is this expected to be used in the future? Right now it is dead code.
This commit is contained in:
Matthias Krüger
2022-09-22 21:34:53 +02:00
committed by GitHub
2 changed files with 12 additions and 27 deletions

View File

@@ -129,7 +129,7 @@ impl<'tcx> UnifyKey for ty::ConstVid<'tcx> {
}
impl<'tcx> UnifyValue for ConstVarValue<'tcx> {
type Error = (ty::Const<'tcx>, ty::Const<'tcx>);
type Error = NoError;
fn unify_values(&value1: &Self, &value2: &Self) -> Result<Self, Self::Error> {
Ok(match (value1.val, value2.val) {