about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2019-03-08 01:12:51 +0000
committervarkor <github@varkor.com>2019-05-01 23:10:05 +0100
commitf1c83de1ddcd64fe05085e5d03f4745bf9a55401 (patch)
tree41a760b212c95a8a4bb6cf0553bbf5e17b09be28
parent9b67bd42b7cbf97f72d039afcba02f5177d0d68c (diff)
downloadrust-f1c83de1ddcd64fe05085e5d03f4745bf9a55401.tar.gz
rust-f1c83de1ddcd64fe05085e5d03f4745bf9a55401.zip
Add `consts` to `TypeRelation`
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
-rw-r--r--src/librustc/ty/relate.rs18
1 files 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 @@ pub trait TypeRelation<'a, 'gcx: 'a+'tcx, 'tcx: 'a> : Sized {
     // 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>>