Skip to content

Commit 1ce85b1

Browse files
authored
Rollup merge of #100025 - tmiasko:rm-transfer-wrapper, r=cjgillot
Remove redundant `TransferWrapper` struct
2 parents e20b599 + 099a32b commit 1ce85b1

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

compiler/rustc_mir_dataflow/src/impls/liveness.rs

+2-14
Original file line numberDiff line numberDiff line change
@@ -222,18 +222,6 @@ impl<'a, 'tcx> AnalysisDomain<'tcx> for MaybeTransitiveLiveLocals<'a> {
222222
}
223223
}
224224

225-
struct TransferWrapper<'a>(&'a mut ChunkedBitSet<Local>);
226-
227-
impl<'a> GenKill<Local> for TransferWrapper<'a> {
228-
fn gen(&mut self, l: Local) {
229-
self.0.insert(l);
230-
}
231-
232-
fn kill(&mut self, l: Local) {
233-
self.0.remove(l);
234-
}
235-
}
236-
237225
impl<'a, 'tcx> Analysis<'tcx> for MaybeTransitiveLiveLocals<'a> {
238226
fn apply_statement_effect(
239227
&self,
@@ -271,7 +259,7 @@ impl<'a, 'tcx> Analysis<'tcx> for MaybeTransitiveLiveLocals<'a> {
271259
return;
272260
}
273261
}
274-
TransferFunction(&mut TransferWrapper(trans)).visit_statement(statement, location);
262+
TransferFunction(trans).visit_statement(statement, location);
275263
}
276264

277265
fn apply_terminator_effect(
@@ -280,7 +268,7 @@ impl<'a, 'tcx> Analysis<'tcx> for MaybeTransitiveLiveLocals<'a> {
280268
terminator: &mir::Terminator<'tcx>,
281269
location: Location,
282270
) {
283-
TransferFunction(&mut TransferWrapper(trans)).visit_terminator(terminator, location);
271+
TransferFunction(trans).visit_terminator(terminator, location);
284272
}
285273

286274
fn apply_call_return_effect(

0 commit comments

Comments
 (0)