Fix bug on MIRVisitor

We were not iterating over all local variables due to a typo.
This commit is contained in:
Celina G. Val 2023-11-07 14:11:15 -08:00
parent e70839ac84
commit 3f87dac9a2

View File

@ -142,7 +142,7 @@ fn super_body(&mut self, body: &Body) {
}
let local_start = arg_count + 1;
for (idx, arg) in body.arg_locals().iter().enumerate() {
for (idx, arg) in body.inner_locals().iter().enumerate() {
self.visit_local_decl(idx + local_start, arg)
}
}
@ -417,7 +417,7 @@ fn super_assert_msg(&mut self, msg: &AssertMessage, location: Location) {
fn visit_opaque(_: &Opaque) {}
/// The location of a statement / terminator in the code and the CFG.
#[derive(Clone, Copy, PartialEq, Eq)]
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
pub struct Location(Span);
impl Location {