@@ -58,8 +58,6 @@ pub struct Inherited<'tcx> {
58
58
pub ( super ) deferred_generator_interiors :
59
59
RefCell < Vec < ( LocalDefId , hir:: BodyId , Ty < ' tcx > , hir:: GeneratorKind ) > > ,
60
60
61
- pub ( super ) body_def_id : LocalDefId ,
62
-
63
61
/// Whenever we introduce an adjustment from `!` into a type variable,
64
62
/// we record that type variable here. This is later used to inform
65
63
/// fallback. See the `fallback` module for details.
@@ -80,7 +78,6 @@ impl<'tcx> Deref for Inherited<'tcx> {
80
78
/// without using `Rc` or something similar.
81
79
pub struct InheritedBuilder < ' tcx > {
82
80
infcx : infer:: InferCtxtBuilder < ' tcx > ,
83
- def_id : LocalDefId ,
84
81
typeck_results : RefCell < ty:: TypeckResults < ' tcx > > ,
85
82
}
86
83
@@ -93,7 +90,6 @@ impl<'tcx> Inherited<'tcx> {
93
90
. infer_ctxt ( )
94
91
. ignoring_regions ( )
95
92
. with_opaque_type_inference ( DefiningAnchor :: Bind ( hir_owner. def_id ) ) ,
96
- def_id,
97
93
typeck_results : RefCell :: new ( ty:: TypeckResults :: new ( hir_owner) ) ,
98
94
}
99
95
}
@@ -104,17 +100,12 @@ impl<'tcx> InheritedBuilder<'tcx> {
104
100
where
105
101
F : FnOnce ( & Inherited < ' tcx > ) -> R ,
106
102
{
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 ) )
109
104
}
110
105
}
111
106
112
107
impl < ' 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 {
118
109
let tcx = infcx. tcx ;
119
110
120
111
Inherited {
@@ -129,7 +120,6 @@ impl<'tcx> Inherited<'tcx> {
129
120
deferred_asm_checks : RefCell :: new ( Vec :: new ( ) ) ,
130
121
deferred_generator_interiors : RefCell :: new ( Vec :: new ( ) ) ,
131
122
diverging_type_vars : RefCell :: new ( Default :: default ( ) ) ,
132
- body_def_id : def_id,
133
123
infer_var_info : RefCell :: new ( Default :: default ( ) ) ,
134
124
}
135
125
}
0 commit comments