@@ -157,15 +157,13 @@ pub struct LiveAllocs<'a, 'mir, 'tcx> {
157
157
158
158
impl LiveAllocs < ' _ , ' _ , ' _ > {
159
159
pub fn is_live ( & self , id : AllocId ) -> bool {
160
- self . collected . contains ( & id) ||
161
- self . ecx . is_alloc_live ( id)
160
+ self . collected . contains ( & id) || self . ecx . is_alloc_live ( id)
162
161
}
163
162
}
164
163
165
164
impl < ' mir , ' tcx : ' mir > EvalContextExt < ' mir , ' tcx > for crate :: MiriInterpCx < ' mir , ' tcx > { }
166
165
pub trait EvalContextExt < ' mir , ' tcx : ' mir > : MiriInterpCxExt < ' mir , ' tcx > {
167
166
fn run_provenance_gc ( & mut self ) {
168
-
169
167
// We collect all tags from various parts of the interpreter, but also
170
168
let this = self . eval_context_mut ( ) ;
171
169
@@ -196,10 +194,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
196
194
197
195
fn remove_unreachable_allocs ( & mut self , allocs : FxHashSet < AllocId > ) {
198
196
let this = self . eval_context_ref ( ) ;
199
- let allocs = LiveAllocs {
200
- ecx : this,
201
- collected : allocs,
202
- } ;
197
+ let allocs = LiveAllocs { ecx : this, collected : allocs } ;
203
198
this. machine . allocation_spans . borrow_mut ( ) . retain ( |id, _| allocs. is_live ( * id) ) ;
204
199
this. machine . intptrcast . borrow_mut ( ) . remove_unreachable_allocs ( & allocs) ;
205
200
if let Some ( borrow_tracker) = & this. machine . borrow_tracker {
0 commit comments