Skip to content

Commit d38b97a

Browse files
committed
fix modes on dtors
1 parent e0d5d03 commit d38b97a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/libsyntax/ast_util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ fn operator_prec(op: ast::binop) -> uint {
399399
fn dtor_dec() -> fn_decl {
400400
let nil_t = @{id: 0, node: ty_nil, span: dummy_sp()};
401401
// dtor has one argument, of type ()
402-
{inputs: ~[{mode: ast::expl(ast::by_ref),
402+
{inputs: ~[{mode: ast::infer(0), // tjc: node id???
403403
ty: nil_t, ident: parse::token::special_idents::underscore,
404404
id: 0}],
405405
output: nil_t, cf: return_val}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
struct Foo {
2+
x: int,
3+
drop { }
4+
}
5+
6+
fn main() {}

0 commit comments

Comments
 (0)