Fix bug on MIRVisitor
We were not iterating over all local variables due to a typo.
This commit is contained in:
parent
e70839ac84
commit
3f87dac9a2
1 changed files with 2 additions and 2 deletions
|
@ -142,7 +142,7 @@ pub trait MirVisitor {
|
||||||
}
|
}
|
||||||
|
|
||||||
let local_start = arg_count + 1;
|
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)
|
self.visit_local_decl(idx + local_start, arg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -417,7 +417,7 @@ pub trait MirVisitor {
|
||||||
fn visit_opaque(_: &Opaque) {}
|
fn visit_opaque(_: &Opaque) {}
|
||||||
|
|
||||||
/// The location of a statement / terminator in the code and the CFG.
|
/// 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);
|
pub struct Location(Span);
|
||||||
|
|
||||||
impl Location {
|
impl Location {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue