Skip to content

Commit 0017116

Browse files
committed
Don't shadow a class name with a local
The fix in 208621 means you now can't shadow a class name with a local, which is consistent with other behavior. But stackwalk was doing that. Fixed it.
1 parent 76d6120 commit 0017116

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/libcore/stackwalk.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ fn walk_stack(visit: fn(frame) -> bool) {
2323
reinterpret_cast(frame_pointer)
2424
};
2525
loop {
26-
let frame = frame(frame_address);
26+
let fr = frame(frame_address);
2727

28-
#debug("frame: %x", unsafe { reinterpret_cast(frame.fp) });
29-
visit(frame);
28+
#debug("frame: %x", unsafe { reinterpret_cast(fr.fp) });
29+
visit(fr);
3030

3131
unsafe {
3232
let next_fp: **word = reinterpret_cast(frame_address);
@@ -44,7 +44,7 @@ fn walk_stack(visit: fn(frame) -> bool) {
4444

4545
#[test]
4646
fn test_simple() {
47-
for walk_stack { |frame|
47+
for walk_stack { |_frame|
4848
}
4949
}
5050

@@ -53,7 +53,7 @@ fn test_simple_deep() {
5353
fn run(i: int) {
5454
if i == 0 { ret }
5555

56-
for walk_stack { |frame|
56+
for walk_stack { |_frame|
5757
unsafe {
5858
breakpoint();
5959
}

0 commit comments

Comments
 (0)