@@ -60,9 +60,9 @@ impl<'tcx> FromCycleError<'tcx> for ty::Binder<'_, ty::FnSig<'_>> {
6060 fn from_cycle_error ( tcx : TyCtxt < ' tcx > , cycle_error : CycleError , guar : ErrorGuaranteed ) -> Self {
6161 let err = Ty :: new_error ( tcx, guar) ;
6262
63- let arity = if let Some ( info ) = cycle_error. cycle . get ( 0 )
64- && info . frame . dep_kind == DepKind :: fn_sig
65- && let Some ( def_id) = info . frame . def_id
63+ let arity = if let Some ( frame ) = cycle_error. cycle . get ( 0 )
64+ && frame. node . dep_kind == DepKind :: fn_sig
65+ && let Some ( def_id) = frame. node . def_id
6666 && let Some ( node) = tcx. hir_get_if_local ( def_id)
6767 && let Some ( sig) = node. fn_sig ( )
6868 {
@@ -94,11 +94,11 @@ impl<'tcx> FromCycleError<'tcx> for Representability {
9494 ) -> Self {
9595 let mut item_and_field_ids = Vec :: new ( ) ;
9696 let mut representable_ids = FxHashSet :: default ( ) ;
97- for info in & cycle_error. cycle {
98- if info . frame . dep_kind == DepKind :: check_representability
99- && let Some ( field_id) = info . frame . def_id
97+ for frame in & cycle_error. cycle {
98+ if frame. node . dep_kind == DepKind :: check_representability
99+ && let Some ( field_id) = frame. node . def_id
100100 && let Some ( field_id) = field_id. as_local ( )
101- && let Some ( DefKind :: Field ) = info . frame . info . def_kind
101+ && let Some ( DefKind :: Field ) = frame. node . info . def_kind
102102 {
103103 let parent_id = tcx. parent ( field_id. to_def_id ( ) ) ;
104104 let item_id = match tcx. def_kind ( parent_id) {
@@ -108,9 +108,9 @@ impl<'tcx> FromCycleError<'tcx> for Representability {
108108 item_and_field_ids. push ( ( item_id. expect_local ( ) , field_id) ) ;
109109 }
110110 }
111- for info in & cycle_error. cycle {
112- if info . frame . dep_kind == DepKind :: check_representability_adt_ty
113- && let Some ( def_id) = info . frame . def_id_for_ty_in_cycle
111+ for frame in & cycle_error. cycle {
112+ if frame. node . dep_kind == DepKind :: check_representability_adt_ty
113+ && let Some ( def_id) = frame. node . def_id_for_ty_in_cycle
114114 && let Some ( def_id) = def_id. as_local ( )
115115 && !item_and_field_ids. iter ( ) . any ( |& ( id, _) | id == def_id)
116116 {
@@ -145,9 +145,9 @@ impl<'tcx> FromCycleError<'tcx> for &[ty::Variance] {
145145 search_for_cycle_permutation (
146146 & cycle_error. cycle ,
147147 |cycle| {
148- if let Some ( info ) = cycle. get ( 0 )
149- && info . frame . dep_kind == DepKind :: variances_of
150- && let Some ( def_id) = info . frame . def_id
148+ if let Some ( frame ) = cycle. get ( 0 )
149+ && frame. node . dep_kind == DepKind :: variances_of
150+ && let Some ( def_id) = frame. node . def_id
151151 {
152152 let n = tcx. generics_of ( def_id) . own_params . len ( ) ;
153153 ControlFlow :: Break ( vec ! [ ty:: Bivariant ; n] . leak ( ) )
@@ -157,7 +157,7 @@ impl<'tcx> FromCycleError<'tcx> for &[ty::Variance] {
157157 } ,
158158 || {
159159 span_bug ! (
160- cycle_error. usage. as_ref( ) . unwrap( ) . 0 ,
160+ cycle_error. usage. as_ref( ) . unwrap( ) . span ,
161161 "only `variances_of` returns `&[ty::Variance]`"
162162 )
163163 } ,
@@ -193,8 +193,8 @@ impl<'tcx, T> FromCycleError<'tcx> for Result<T, &'_ ty::layout::LayoutError<'_>
193193 let diag = search_for_cycle_permutation (
194194 & cycle_error. cycle ,
195195 |cycle| {
196- if cycle[ 0 ] . frame . dep_kind == DepKind :: layout_of
197- && let Some ( def_id) = cycle[ 0 ] . frame . def_id_for_ty_in_cycle
196+ if cycle[ 0 ] . node . dep_kind == DepKind :: layout_of
197+ && let Some ( def_id) = cycle[ 0 ] . node . def_id_for_ty_in_cycle
198198 && let Some ( def_id) = def_id. as_local ( )
199199 && let def_kind = tcx. def_kind ( def_id)
200200 && matches ! ( def_kind, DefKind :: Closure )
@@ -217,18 +217,18 @@ impl<'tcx, T> FromCycleError<'tcx> for Result<T, &'_ ty::layout::LayoutError<'_>
217217 tcx. def_kind_descr_article( def_kind, def_id. to_def_id( ) ) ,
218218 tcx. def_kind_descr( def_kind, def_id. to_def_id( ) ) ,
219219 ) ;
220- for ( i, info ) in cycle. iter ( ) . enumerate ( ) {
221- if info . frame . dep_kind != DepKind :: layout_of {
220+ for ( i, frame ) in cycle. iter ( ) . enumerate ( ) {
221+ if frame. node . dep_kind != DepKind :: layout_of {
222222 continue ;
223223 }
224- let Some ( frame_def_id) = info . frame . def_id_for_ty_in_cycle else {
224+ let Some ( frame_def_id) = frame. node . def_id_for_ty_in_cycle else {
225225 continue ;
226226 } ;
227227 let Some ( frame_coroutine_kind) = tcx. coroutine_kind ( frame_def_id) else {
228228 continue ;
229229 } ;
230230 let frame_span =
231- info . frame . info . default_span ( cycle[ ( i + 1 ) % cycle. len ( ) ] . span ) ;
231+ frame. node . info . default_span ( cycle[ ( i + 1 ) % cycle. len ( ) ] . span ) ;
232232 if frame_span. is_dummy ( ) {
233233 continue ;
234234 }
0 commit comments