about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ast_util.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsyntax/ast_util.rs b/src/libsyntax/ast_util.rs
index fe0da2e17b8..3afceeef59e 100644
--- a/src/libsyntax/ast_util.rs
+++ b/src/libsyntax/ast_util.rs
@@ -440,8 +440,10 @@ fn operator_prec(op: ast::binop) -> uint {
   }
 }
 
+fn dtor_ty() -> @ast::Ty { @ast::Ty {id: 0, node: ty_nil, span: dummy_sp()} }
+
 fn dtor_dec() -> fn_decl {
-    let nil_t = @ast::Ty { id: 0, node: ty_nil, span: dummy_sp() };
+    let nil_t = dtor_ty();
     // dtor has no args
     ast::fn_decl {
         inputs: ~[],