Skip to content

Commit fe2519b

Browse files
committed
Relate impl
1 parent 7199946 commit fe2519b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

compiler/rustc_middle/src/ty/relate.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,19 @@ impl<'tcx> Relate<'tcx> for ast::Constness {
214214
}
215215
}
216216

217+
impl<'tcx, T: Relate<'tcx>> Relate<'tcx> for ty::ConstnessAnd<T> {
218+
fn relate<R: TypeRelation<'tcx>>(
219+
relation: &mut R,
220+
a: ty::ConstnessAnd<T>,
221+
b: ty::ConstnessAnd<T>,
222+
) -> RelateResult<'tcx, ty::ConstnessAnd<T>> {
223+
Ok(ty::ConstnessAnd {
224+
constness: relation.relate(a.constness, b.constness)?,
225+
value: relation.relate(a.value, b.value)?,
226+
})
227+
}
228+
}
229+
217230
impl<'tcx> Relate<'tcx> for ast::Unsafety {
218231
fn relate<R: TypeRelation<'tcx>>(
219232
relation: &mut R,

0 commit comments

Comments
 (0)