From f1c83de1ddcd64fe05085e5d03f4745bf9a55401 Mon Sep 17 00:00:00 2001 From: varkor Date: Fri, 8 Mar 2019 01:12:51 +0000 Subject: [PATCH] Add `consts` to `TypeRelation` Co-Authored-By: Gabriel Smith --- src/librustc/ty/relate.rs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/librustc/ty/relate.rs b/src/librustc/ty/relate.rs index 2638a1c7c88..03ca414cd54 100644 --- a/src/librustc/ty/relate.rs +++ b/src/librustc/ty/relate.rs @@ -76,11 +76,19 @@ fn relate_with_variance>(&mut self, // additional hooks for other types in the future if needed // without making older code, which called `relate`, obsolete. - fn tys(&mut self, a: Ty<'tcx>, b: Ty<'tcx>) - -> RelateResult<'tcx, Ty<'tcx>>; - - fn regions(&mut self, a: ty::Region<'tcx>, b: ty::Region<'tcx>) - -> RelateResult<'tcx, ty::Region<'tcx>>; + fn tys(&mut self, a: Ty<'tcx>, b: Ty<'tcx>) -> RelateResult<'tcx, Ty<'tcx>>; + + fn regions( + &mut self, + a: ty::Region<'tcx>, + b: ty::Region<'tcx> + ) -> RelateResult<'tcx, ty::Region<'tcx>>; + + fn consts( + &mut self, + a: &'tcx ty::LazyConst<'tcx>, + b: &'tcx ty::LazyConst<'tcx> + ) -> RelateResult<'tcx, &'tcx ty::LazyConst<'tcx>>; fn binders(&mut self, a: &ty::Binder, b: &ty::Binder) -> RelateResult<'tcx, ty::Binder> -- 2.44.0