@@ -76,7 +76,9 @@ struct TypeVariableData<'tcx> {
7676}
7777
7878enum TypeVariableValue < ' tcx > {
79- Known ( Ty < ' tcx > ) ,
79+ Known {
80+ value : Ty < ' tcx >
81+ } ,
8082 Bounded {
8183 default : Option < Default < ' tcx > >
8284 }
@@ -117,7 +119,7 @@ impl<'tcx> TypeVariableTable<'tcx> {
117119
118120 pub fn default ( & self , vid : ty:: TyVid ) -> Option < Default < ' tcx > > {
119121 match & self . values . get ( vid. index as usize ) . value {
120- & Known ( _ ) => None ,
122+ & Known { .. } => None ,
121123 & Bounded { ref default, .. } => default. clone ( )
122124 }
123125 }
@@ -158,14 +160,14 @@ impl<'tcx> TypeVariableTable<'tcx> {
158160
159161 let old_value = {
160162 let vid_data = & mut self . values [ vid. index as usize ] ;
161- mem:: replace ( & mut vid_data. value , TypeVariableValue :: Known ( ty ) )
163+ mem:: replace ( & mut vid_data. value , TypeVariableValue :: Known { value : ty } )
162164 } ;
163165
164166 match old_value {
165167 TypeVariableValue :: Bounded { default } => {
166168 self . values . record ( Instantiate { vid : vid, default : default } ) ;
167169 }
168- TypeVariableValue :: Known ( old_ty) => {
170+ TypeVariableValue :: Known { value : old_ty } => {
169171 bug ! ( "instantiating type variable `{:?}` twice: new-value = {:?}, old-value={:?}" ,
170172 vid, ty, old_ty)
171173 }
@@ -233,7 +235,7 @@ impl<'tcx> TypeVariableTable<'tcx> {
233235 debug_assert ! ( self . root_var( vid) == vid) ;
234236 match self . values . get ( vid. index as usize ) . value {
235237 Bounded { .. } => None ,
236- Known ( t ) => Some ( t )
238+ Known { value } => Some ( value )
237239 }
238240 }
239241
@@ -334,7 +336,7 @@ impl<'tcx> TypeVariableTable<'tcx> {
334336 // created since the snapshot started or not.
335337 let escaping_type = match self . values . get ( vid. index as usize ) . value {
336338 Bounded { .. } => bug ! ( ) ,
337- Known ( ty ) => ty ,
339+ Known { value } => value ,
338340 } ;
339341 escaping_types. push ( escaping_type) ;
340342 }
0 commit comments