diff options
| author | Marijn Haverbeke <[email protected]> | 2011-05-12 10:51:13 +0200 |
|---|---|---|
| committer | Marijn Haverbeke <[email protected]> | 2011-05-12 10:51:13 +0200 |
| commit | 2b36e40c58a4b153da593e4da73ba45647b811de (patch) | |
| tree | c2cad9d5166622366057eb7c59b3e9dc0221e717 /src/comp/util/common.rs | |
| parent | Properly lex block comments followed by EOF (diff) | |
| download | rust-2b36e40c58a4b153da593e4da73ba45647b811de.tar.xz rust-2b36e40c58a4b153da593e4da73ba45647b811de.zip | |
Ensure ann tags are actually kept around during typechecking
This way, the tag assigned by the parser stays with the node.
I realize ann replacing is probably going away real soon, but
I needed this now for moving the resolve defs out of the AST.
Diffstat (limited to 'src/comp/util/common.rs')
| -rw-r--r-- | src/comp/util/common.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/comp/util/common.rs b/src/comp/util/common.rs index 5181cb45..83223d75 100644 --- a/src/comp/util/common.rs +++ b/src/comp/util/common.rs @@ -117,8 +117,8 @@ fn field_exprs(vec[ast.field] fields) -> vec [@ast.expr] { ret Vec.map[ast.field, @ast.expr](f, fields); } -fn plain_ann(middle.ty.ctxt tcx) -> ast.ann { - ret ast.ann_type(middle.ty.mk_nil(tcx), +fn plain_ann(&ast.ann old, middle.ty.ctxt tcx) -> ast.ann { + ret ast.ann_type(ast.ann_tag(old), middle.ty.mk_nil(tcx), none[vec[middle.ty.t]], none[@ts_ann]); } @@ -164,7 +164,7 @@ fn log_ann(&ast.ann a) -> () { case (ast.ann_none(_)) { log("ann_none"); } - case (ast.ann_type(_,_,_)) { + case (ast.ann_type(_,_,_,_)) { log("ann_type"); } } |