@@ -58,8 +58,6 @@ pub struct Inherited<'tcx> {
5858 pub ( super ) deferred_generator_interiors :
5959 RefCell < Vec < ( LocalDefId , hir:: BodyId , Ty < ' tcx > , hir:: GeneratorKind ) > > ,
6060
61- pub ( super ) body_def_id : LocalDefId ,
62-
6361 /// Whenever we introduce an adjustment from `!` into a type variable,
6462 /// we record that type variable here. This is later used to inform
6563 /// fallback. See the `fallback` module for details.
@@ -80,7 +78,6 @@ impl<'tcx> Deref for Inherited<'tcx> {
8078/// without using `Rc` or something similar.
8179pub struct InheritedBuilder < ' tcx > {
8280 infcx : infer:: InferCtxtBuilder < ' tcx > ,
83- def_id : LocalDefId ,
8481 typeck_results : RefCell < ty:: TypeckResults < ' tcx > > ,
8582}
8683
@@ -93,7 +90,6 @@ impl<'tcx> Inherited<'tcx> {
9390 . infer_ctxt ( )
9491 . ignoring_regions ( )
9592 . with_opaque_type_inference ( DefiningAnchor :: Bind ( hir_owner. def_id ) ) ,
96- def_id,
9793 typeck_results : RefCell :: new ( ty:: TypeckResults :: new ( hir_owner) ) ,
9894 }
9995 }
@@ -104,17 +100,12 @@ impl<'tcx> InheritedBuilder<'tcx> {
104100 where
105101 F : FnOnce ( & Inherited < ' tcx > ) -> R ,
106102 {
107- let def_id = self . def_id ;
108- f ( & Inherited :: new ( self . infcx . build ( ) , def_id, self . typeck_results ) )
103+ f ( & Inherited :: new ( self . infcx . build ( ) , self . typeck_results ) )
109104 }
110105}
111106
112107impl < ' tcx > Inherited < ' tcx > {
113- fn new (
114- infcx : InferCtxt < ' tcx > ,
115- def_id : LocalDefId ,
116- typeck_results : RefCell < ty:: TypeckResults < ' tcx > > ,
117- ) -> Self {
108+ fn new ( infcx : InferCtxt < ' tcx > , typeck_results : RefCell < ty:: TypeckResults < ' tcx > > ) -> Self {
118109 let tcx = infcx. tcx ;
119110
120111 Inherited {
@@ -129,7 +120,6 @@ impl<'tcx> Inherited<'tcx> {
129120 deferred_asm_checks : RefCell :: new ( Vec :: new ( ) ) ,
130121 deferred_generator_interiors : RefCell :: new ( Vec :: new ( ) ) ,
131122 diverging_type_vars : RefCell :: new ( Default :: default ( ) ) ,
132- body_def_id : def_id,
133123 infer_var_info : RefCell :: new ( Default :: default ( ) ) ,
134124 }
135125 }
0 commit comments