We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
prev_pos
1 parent ad2fd11 commit a768afeCopy full SHA for a768afe
cranelift/codegen/src/legalizer/mod.rs
@@ -73,8 +73,11 @@ fn forward_walk(
73
) {
74
let mut pos = FuncCursor::new(func);
75
while let Some(_block) = pos.next_block() {
76
- let prev_pos = pos.position();
77
- while let Some(inst) = pos.next_inst() {
+ let mut prev_pos;
+ while let Some(inst) = {
78
+ prev_pos = pos.position();
79
+ pos.next_inst()
80
+ } {
81
match f(pos.func, inst) {
82
WalkCommand::Continue => continue,
83
WalkCommand::Revisit => pos.set_position(prev_pos),
0 commit comments