diff --git a/compiler/rustc_middle/src/ty/relate.rs b/compiler/rustc_middle/src/ty/relate.rs index 8efb88d40406..9c48f05617e0 100644 --- a/compiler/rustc_middle/src/ty/relate.rs +++ b/compiler/rustc_middle/src/ty/relate.rs @@ -214,6 +214,19 @@ impl<'tcx> Relate<'tcx> for ast::Constness { } } +impl<'tcx, T: Relate<'tcx>> Relate<'tcx> for ty::ConstnessAnd { + fn relate>( + relation: &mut R, + a: ty::ConstnessAnd, + b: ty::ConstnessAnd, + ) -> RelateResult<'tcx, ty::ConstnessAnd> { + Ok(ty::ConstnessAnd { + constness: relation.relate(a.constness, b.constness)?, + value: relation.relate(a.value, b.value)?, + }) + } +} + impl<'tcx> Relate<'tcx> for ast::Unsafety { fn relate>( relation: &mut R,