@@ -45,14 +45,6 @@ impl<'a, 'tcx> TypeRelation<'a, 'tcx> for Sub<'a, 'tcx> {
4545 r
4646 }
4747
48- fn will_change ( & mut self , a : bool , b : bool ) -> bool {
49- // if we have (Foo+'a) <: (Foo+'b), this requires that 'a:'b.
50- // So if 'a becomes 'static, no additional errors can occur.
51- // OTOH, if 'a stays the same, but 'b becomes 'static, we
52- // could have a problem.
53- !a && b
54- }
55-
5648 fn relate_with_variance < T : Relate < ' a , ' tcx > > ( & mut self ,
5749 variance : ty:: Variance ,
5850 a : & T ,
@@ -106,12 +98,10 @@ impl<'a, 'tcx> TypeRelation<'a, 'tcx> for Sub<'a, 'tcx> {
10698 fn regions ( & mut self , a : ty:: Region , b : ty:: Region ) -> RelateResult < ' tcx , ty:: Region > {
10799 debug ! ( "{}.regions({:?}, {:?}) self.cause={:?}" ,
108100 self . tag( ) , a, b, self . fields. cause) ;
109- let origin = match self . fields . cause {
110- Some ( Cause :: ExistentialRegionBound ( true ) ) =>
111- SubregionOrigin :: DefaultExistentialBound ( self . fields . trace . clone ( ) ) ,
112- _ =>
113- SubregionOrigin :: Subtype ( self . fields . trace . clone ( ) ) ,
114- } ;
101+ // FIXME -- we have more fine-grained information available
102+ // from the "cause" field, we could perhaps give more tailored
103+ // error messages.
104+ let origin = SubregionOrigin :: Subtype ( self . fields . trace . clone ( ) ) ;
115105 self . fields . infcx . region_vars . make_subregion ( origin, a, b) ;
116106 Ok ( a)
117107 }
0 commit comments