]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/infer/lub.rs
Rename infcx lifetimes in inference relations
[rust.git] / src / librustc / infer / lub.rs
index bd46f3a26a2def175852a5026a87d0e2ee8cf6f0..bd87c91dea58c13e40720c4bc158731b718a5392 100644 (file)
 use traits::PredicateObligations;
 
 /// "Least upper bound" (common supertype)
-pub struct Lub<'a, 'gcx: 'a+'tcx, 'tcx: 'a> {
-    fields: CombineFields<'a, 'gcx, 'tcx>
+pub struct Lub<'infcx, 'gcx: 'infcx+'tcx, 'tcx: 'infcx> {
+    fields: CombineFields<'infcx, 'gcx, 'tcx>
 }
 
-impl<'a, 'gcx, 'tcx> Lub<'a, 'gcx, 'tcx> {
-    pub fn new(fields: CombineFields<'a, 'gcx, 'tcx>) -> Lub<'a, 'gcx, 'tcx> {
+impl<'infcx, 'gcx, 'tcx> Lub<'infcx, 'gcx, 'tcx> {
+    pub fn new(fields: CombineFields<'infcx, 'gcx, 'tcx>) -> Lub<'infcx, 'gcx, 'tcx> {
         Lub { fields: fields }
     }
 
@@ -32,10 +32,10 @@ pub fn obligations(self) -> PredicateObligations<'tcx> {
     }
 }
 
-impl<'a, 'gcx, 'tcx> TypeRelation<'a, 'gcx, 'tcx> for Lub<'a, 'gcx, 'tcx> {
+impl<'infcx, 'gcx, 'tcx> TypeRelation<'infcx, 'gcx, 'tcx> for Lub<'infcx, 'gcx, 'tcx> {
     fn tag(&self) -> &'static str { "Lub" }
 
-    fn tcx(&self) -> TyCtxt<'a, 'gcx, 'tcx> { self.fields.tcx() }
+    fn tcx(&self) -> TyCtxt<'infcx, 'gcx, 'tcx> { self.fields.tcx() }
 
     fn a_is_expected(&self) -> bool { self.fields.a_is_expected }
 
@@ -75,8 +75,8 @@ fn binders<T>(&mut self, a: &ty::Binder<T>, b: &ty::Binder<T>)
     }
 }
 
-impl<'a, 'gcx, 'tcx> LatticeDir<'a, 'gcx, 'tcx> for Lub<'a, 'gcx, 'tcx> {
-    fn infcx(&self) -> &'a InferCtxt<'a, 'gcx, 'tcx> {
+impl<'infcx, 'gcx, 'tcx> LatticeDir<'infcx, 'gcx, 'tcx> for Lub<'infcx, 'gcx, 'tcx> {
+    fn infcx(&self) -> &'infcx InferCtxt<'infcx, 'gcx, 'tcx> {
         self.fields.infcx
     }