@@ -7,7 +7,7 @@ mod suggestions;
77use crate :: coercion:: DynamicCoerceMany ;
88use crate :: fallback:: DivergingFallbackBehavior ;
99use crate :: fn_ctxt:: checks:: DivergingBlockBehavior ;
10- use crate :: { CoroutineTypes , Diverges , EnclosingBreakables , Inherited } ;
10+ use crate :: { CoroutineTypes , Diverges , EnclosingBreakables , TypeckRootCtxt } ;
1111use hir:: def_id:: CRATE_DEF_ID ;
1212use rustc_errors:: { DiagCtxt , ErrorGuaranteed } ;
1313use rustc_hir as hir;
@@ -108,7 +108,7 @@ pub struct FnCtxt<'a, 'tcx> {
108108
109109 pub ( super ) enclosing_breakables : RefCell < EnclosingBreakables < ' tcx > > ,
110110
111- pub ( super ) inh : & ' a Inherited < ' tcx > ,
111+ pub ( super ) root_ctxt : & ' a TypeckRootCtxt < ' tcx > ,
112112
113113 pub ( super ) fallback_has_occurred : Cell < bool > ,
114114
@@ -118,12 +118,12 @@ pub struct FnCtxt<'a, 'tcx> {
118118
119119impl < ' a , ' tcx > FnCtxt < ' a , ' tcx > {
120120 pub fn new (
121- inh : & ' a Inherited < ' tcx > ,
121+ root_ctxt : & ' a TypeckRootCtxt < ' tcx > ,
122122 param_env : ty:: ParamEnv < ' tcx > ,
123123 body_id : LocalDefId ,
124124 ) -> FnCtxt < ' a , ' tcx > {
125125 let ( diverging_fallback_behavior, diverging_block_behavior) =
126- parse_never_type_options_attr ( inh . tcx ) ;
126+ parse_never_type_options_attr ( root_ctxt . tcx ) ;
127127 FnCtxt {
128128 body_id,
129129 param_env,
@@ -137,7 +137,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
137137 stack : Vec :: new ( ) ,
138138 by_id : Default :: default ( ) ,
139139 } ) ,
140- inh ,
140+ root_ctxt ,
141141 fallback_has_occurred : Cell :: new ( false ) ,
142142 diverging_fallback_behavior,
143143 diverging_block_behavior,
@@ -206,9 +206,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
206206}
207207
208208impl < ' a , ' tcx > Deref for FnCtxt < ' a , ' tcx > {
209- type Target = Inherited < ' tcx > ;
209+ type Target = TypeckRootCtxt < ' tcx > ;
210210 fn deref ( & self ) -> & Self :: Target {
211- self . inh
211+ self . root_ctxt
212212 }
213213}
214214
0 commit comments