diff options
| author | Patrick Walton <[email protected]> | 2010-12-10 17:24:53 -0800 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2010-12-10 17:24:53 -0800 |
| commit | 0d43c198f0d1b8dd9ff180afb24ded7c98d3bae7 (patch) | |
| tree | 167d941acd7aa19f4e7dc1ac37f27d9ae18a78b9 /src/comp/front | |
| parent | rustc: Add tag support to ty_of_item in typeck (diff) | |
| download | rust-0d43c198f0d1b8dd9ff180afb24ded7c98d3bae7.tar.xz rust-0d43c198f0d1b8dd9ff180afb24ded7c98d3bae7.zip | |
rustc: Add def ids to pattern bindings
Diffstat (limited to 'src/comp/front')
| -rw-r--r-- | src/comp/front/ast.rs | 2 | ||||
| -rw-r--r-- | src/comp/front/parser.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/comp/front/ast.rs b/src/comp/front/ast.rs index 553a49f6..71065150 100644 --- a/src/comp/front/ast.rs +++ b/src/comp/front/ast.rs @@ -46,7 +46,7 @@ type block_ = rec(vec[@stmt] stmts, type pat = spanned[pat_]; tag pat_ { pat_wild(ann); - pat_bind(ident, ann); + pat_bind(ident, def_id, ann); pat_tag(ident, vec[@pat], ann); } diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs index dd5df9b5..f8db2f71 100644 --- a/src/comp/front/parser.rs +++ b/src/comp/front/parser.rs @@ -883,7 +883,7 @@ impure fn parse_pat(parser p) -> @ast.pat { alt (p.peek()) { case (token.IDENT(?id)) { p.bump(); - pat = ast.pat_bind(id, ast.ann_none); + pat = ast.pat_bind(id, p.next_def_id(), ast.ann_none); } case (?tok) { p.err("expected identifier after '?' in pattern but " + |