]> git.lizzy.rs Git - rust.git/commitdiff
Add `consts` to `TypeRelation`
authorvarkor <github@varkor.com>
Fri, 8 Mar 2019 01:12:51 +0000 (01:12 +0000)
committervarkor <github@varkor.com>
Wed, 1 May 2019 22:10:05 +0000 (23:10 +0100)
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
src/librustc/ty/relate.rs

index 2638a1c7c8808e065c69d3a063e569e5fa8b8128..03ca414cd5462b5e47aafe2aedbf2cb8242a94a3 100644 (file)
@@ -76,11 +76,19 @@ fn relate_with_variance<T: Relate<'tcx>>(&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<T>(&mut self, a: &ty::Binder<T>, b: &ty::Binder<T>)
                   -> RelateResult<'tcx, ty::Binder<T>>