]> git.lizzy.rs Git - rust.git/commitdiff
Fix a use of visit in rustc::middle::fn_usage
authorBrian Anderson <banderson@mozilla.com>
Thu, 13 Oct 2011 21:53:34 +0000 (14:53 -0700)
committerBrian Anderson <banderson@mozilla.com>
Thu, 13 Oct 2011 21:55:47 +0000 (14:55 -0700)
This was working by just skipping an AST node instead of doing the advertised
check. I can't find a test case for it, but this is more correct.

src/comp/middle/fn_usage.rs

index 035d611fbdc61ce2c28ca6db8af563e9fd6dc5eb..70d5b57f3d98c1d6f2ff14501142e3e4b0d22bb2 100644 (file)
@@ -51,7 +51,7 @@ fn fn_usage_expr(expr: @ast::expr,
       ast::expr_call(f, args) {
         let f_ctx = {unsafe_fn_legal: true,
                      generic_bare_fn_legal: true with ctx};
-        visit::visit_expr(f, f_ctx, v);
+        v.visit_expr(f, f_ctx, v);
 
         let args_ctx = {unsafe_fn_legal: false,
                         generic_bare_fn_legal: false with ctx};