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.
This commit is contained in:
@@ -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}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user