Skip to content

Commit 608d6e8

Browse files
committed
Fix bug on MIRVisitor
We were not iterating over all local variables due to a typo.
1 parent a19d727 commit 608d6e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/stable_mir/src/mir/visit.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ pub trait MirVisitor {
133133
}
134134

135135
let local_start = arg_count + 1;
136-
for (idx, arg) in body.arg_locals().iter().enumerate() {
136+
for (idx, arg) in body.inner_locals().iter().enumerate() {
137137
self.visit_local_decl(idx + local_start, arg)
138138
}
139139
}
@@ -386,7 +386,7 @@ pub trait MirVisitor {
386386
fn visit_opaque(_: &Opaque) {}
387387

388388
/// The location of a statement / terminator in the code and the CFG.
389-
#[derive(Clone, Copy, PartialEq, Eq)]
389+
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
390390
pub struct Location(Span);
391391

392392
impl Location {

0 commit comments

Comments
 (0)