@@ -55,36 +55,6 @@ impl<'f, 'tcx> Combine<'tcx> for Glb<'f, 'tcx> {
55
55
}
56
56
}
57
57
58
- fn mts ( & self , a : & ty:: mt < ' tcx > , b : & ty:: mt < ' tcx > ) -> cres < ' tcx , ty:: mt < ' tcx > > {
59
- let tcx = self . fields . infcx . tcx ;
60
-
61
- debug ! ( "{}.mts({}, {})" ,
62
- self . tag( ) ,
63
- mt_to_string( tcx, a) ,
64
- mt_to_string( tcx, b) ) ;
65
-
66
- match ( a. mutbl , b. mutbl ) {
67
- // If one side or both is mut, then the GLB must use
68
- // the precise type from the mut side.
69
- ( MutMutable , MutMutable ) => {
70
- let t = try!( self . equate ( ) . tys ( a. ty , b. ty ) ) ;
71
- Ok ( ty:: mt { ty : t, mutbl : MutMutable } )
72
- }
73
-
74
- // If one side or both is immutable, we can use the GLB of
75
- // both sides but mutbl must be `MutImmutable`.
76
- ( MutImmutable , MutImmutable ) => {
77
- let t = try!( self . tys ( a. ty , b. ty ) ) ;
78
- Ok ( ty:: mt { ty : t, mutbl : MutImmutable } )
79
- }
80
-
81
- // There is no mutual subtype of these combinations.
82
- ( MutMutable , MutImmutable ) |
83
- ( MutImmutable , MutMutable ) => {
84
- Err ( ty:: terr_mutability)
85
- }
86
- }
87
- }
88
58
89
59
fn unsafeties ( & self , a : Unsafety , b : Unsafety ) -> cres < ' tcx , Unsafety > {
90
60
match ( a, b) {
0 commit comments