diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-09-26 19:40:05 -0700 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-09-26 19:42:02 -0700 |
| commit | 996ec62cbfce9f25ecc8b573a0b9eb7f4a1b6db9 (patch) | |
| tree | 9d544b22c33bddfea8376115fb4ee1ac0cd3a078 /src/libsyntax | |
| parent | 656cbead49f0d7022152887970719f9c95f76419 (diff) | |
| download | rust-996ec62cbfce9f25ecc8b573a0b9eb7f4a1b6db9.tar.gz rust-996ec62cbfce9f25ecc8b573a0b9eb7f4a1b6db9.zip | |
Remove spurious by-ref argument to destructors
Destructors were internally declared with an extra (hidden) nil-typed argument that was passed in by-ref mode. This was causing spurious mode warnings. Deleted it. Also some misc. cleanup because I couldn't help myself.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast_util.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libsyntax/ast_util.rs b/src/libsyntax/ast_util.rs index 329c9f362a4..a2c935ea6f4 100644 --- a/src/libsyntax/ast_util.rs +++ b/src/libsyntax/ast_util.rs @@ -398,10 +398,8 @@ fn operator_prec(op: ast::binop) -> uint { fn dtor_dec() -> fn_decl { let nil_t = @{id: 0, node: ty_nil, span: dummy_sp()}; - // dtor has one argument, of type () - {inputs: ~[{mode: ast::expl(ast::by_ref), - ty: nil_t, ident: parse::token::special_idents::underscore, - id: 0}], + // dtor has no args + {inputs: ~[], output: nil_t, cf: return_val} } |
