@@ -24,7 +24,7 @@ pub type RelateResult<'tcx, T> = Result<T, ty::TypeError<'tcx>>;
24
24
25
25
#[ derive( Clone , Debug ) ]
26
26
pub enum Cause {
27
- ExistentialRegionBound ( bool ) , // if true, this is a default, else explicit
27
+ ExistentialRegionBound , // relating an existential region bound
28
28
}
29
29
30
30
pub trait TypeRelation < ' a , ' tcx > : Sized {
@@ -43,13 +43,6 @@ pub trait TypeRelation<'a,'tcx> : Sized {
43
43
f ( self )
44
44
}
45
45
46
- /// Hack for deciding whether the lifetime bound defaults change
47
- /// will be a breaking change or not. The bools indicate whether
48
- /// `a`/`b` have a default that will change to `'static`; the
49
- /// result is true if this will potentially affect the affect of
50
- /// relating `a` and `b`.
51
- fn will_change ( & mut self , a : bool , b : bool ) -> bool ;
52
-
53
46
/// Generic relation routine suitable for most anything.
54
47
fn relate < T : Relate < ' a , ' tcx > > ( & mut self , a : & T , b : & T ) -> RelateResult < ' tcx , T > {
55
48
Relate :: relate ( self , a, b)
@@ -384,21 +377,17 @@ impl<'a,'tcx:'a> Relate<'a,'tcx> for ty::ExistentialBounds<'tcx> {
384
377
-> RelateResult < ' tcx , ty:: ExistentialBounds < ' tcx > >
385
378
where R : TypeRelation < ' a , ' tcx >
386
379
{
387
- let will_change = relation. will_change ( a. region_bound_will_change ,
388
- b. region_bound_will_change ) ;
389
-
390
380
let r =
391
381
try!( relation. with_cause (
392
- Cause :: ExistentialRegionBound ( will_change ) ,
382
+ Cause :: ExistentialRegionBound ,
393
383
|relation| relation. relate_with_variance ( ty:: Contravariant ,
394
384
& a. region_bound ,
395
385
& b. region_bound ) ) ) ;
396
386
let nb = try!( relation. relate ( & a. builtin_bounds , & b. builtin_bounds ) ) ;
397
387
let pb = try!( relation. relate ( & a. projection_bounds , & b. projection_bounds ) ) ;
398
388
Ok ( ty:: ExistentialBounds { region_bound : r,
399
389
builtin_bounds : nb,
400
- projection_bounds : pb,
401
- region_bound_will_change : will_change } )
390
+ projection_bounds : pb } )
402
391
}
403
392
}
404
393
0 commit comments