From 00171165205a1d5222563d0e2bdf7f970758b388 Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Tue, 19 Jun 2012 12:01:02 -0700 Subject: [PATCH] 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. --- src/libcore/stackwalk.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libcore/stackwalk.rs b/src/libcore/stackwalk.rs index 321fa605f48b..0041dde319d2 100644 --- a/src/libcore/stackwalk.rs +++ b/src/libcore/stackwalk.rs @@ -23,10 +23,10 @@ fn walk_stack(visit: fn(frame) -> bool) { reinterpret_cast(frame_pointer) }; loop { - let frame = frame(frame_address); + let fr = frame(frame_address); - #debug("frame: %x", unsafe { reinterpret_cast(frame.fp) }); - visit(frame); + #debug("frame: %x", unsafe { reinterpret_cast(fr.fp) }); + visit(fr); unsafe { let next_fp: **word = reinterpret_cast(frame_address); @@ -44,7 +44,7 @@ fn walk_stack(visit: fn(frame) -> bool) { #[test] fn test_simple() { - for walk_stack { |frame| + for walk_stack { |_frame| } } @@ -53,7 +53,7 @@ fn test_simple_deep() { fn run(i: int) { if i == 0 { ret } - for walk_stack { |frame| + for walk_stack { |_frame| unsafe { breakpoint(); }