fix modes on dtors
This commit is contained in:
@@ -399,7 +399,7 @@ fn operator_prec(op: ast::binop) -> uint {
|
|||||||
fn dtor_dec() -> fn_decl {
|
fn dtor_dec() -> fn_decl {
|
||||||
let nil_t = @{id: 0, node: ty_nil, span: dummy_sp()};
|
let nil_t = @{id: 0, node: ty_nil, span: dummy_sp()};
|
||||||
// dtor has one argument, of type ()
|
// dtor has one argument, of type ()
|
||||||
{inputs: ~[{mode: ast::expl(ast::by_ref),
|
{inputs: ~[{mode: ast::infer(0), // tjc: node id???
|
||||||
ty: nil_t, ident: parse::token::special_idents::underscore,
|
ty: nil_t, ident: parse::token::special_idents::underscore,
|
||||||
id: 0}],
|
id: 0}],
|
||||||
output: nil_t, cf: return_val}
|
output: nil_t, cf: return_val}
|
||||||
|
|||||||
6
src/test/run-pass/dtor-explicit-mode.rs
Normal file
6
src/test/run-pass/dtor-explicit-mode.rs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
struct Foo {
|
||||||
|
x: int,
|
||||||
|
drop { }
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {}
|
||||||
Reference in New Issue
Block a user