Skip to content

Commit

Permalink
fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
brmataptos committed Dec 4, 2024
1 parent 9542fd0 commit 02fb9ec
Showing 1 changed file with 12 additions and 21 deletions.
33 changes: 12 additions & 21 deletions third_party/move/move-compiler-v2/src/env_pipeline/lambda_lifter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -608,13 +608,10 @@ impl<'a> ExpRewriterFunctions for LambdaLifter<'a> {

fn rewrite_assign(&mut self, _node_id: NodeId, lhs: &Pattern, _rhs: &Exp) -> Option<Exp> {
for (node_id, name) in lhs.vars() {
self.free_locals.insert(
name,
VarInfo {
node_id,
modified: true,
},
);
self.free_locals.insert(name, VarInfo {
node_id,
modified: true,
});
}
None
}
Expand All @@ -623,22 +620,16 @@ impl<'a> ExpRewriterFunctions for LambdaLifter<'a> {
if matches!(oper, Operation::Borrow(ReferenceKind::Mutable)) {
match args[0].as_ref() {
ExpData::LocalVar(node_id, name) => {
self.free_locals.insert(
*name,
VarInfo {
node_id: *node_id,
modified: true,
},
);
self.free_locals.insert(*name, VarInfo {
node_id: *node_id,
modified: true,
});
},
ExpData::Temporary(node_id, param) => {
self.free_params.insert(
*param,
VarInfo {
node_id: *node_id,
modified: true,
},
);
self.free_params.insert(*param, VarInfo {
node_id: *node_id,
modified: true,
});
},
_ => {},
}
Expand Down

0 comments on commit 02fb9ec

Please sign in to comment.