about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2013-01-22 14:27:07 -0800
committerTim Chevalier <chevalier@alum.wellesley.edu>2013-01-22 14:28:05 -0800
commit17ea548275364fac7cb5adbdc442010d1ba0d38d (patch)
treeed0ad40974239ad35d80b8cba2c4b9e572e2974d /src/libsyntax
parent5b4e569bf357a3f3c66e96d252a27a1a3c2b3af1 (diff)
downloadrust-17ea548275364fac7cb5adbdc442010d1ba0d38d.tar.gz
rust-17ea548275364fac7cb5adbdc442010d1ba0d38d.zip
Clean up previous commit to not require an Option
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: ~[],