diff options
| author | Marijn Haverbeke <marijnh@gmail.com> | 2012-03-07 12:54:00 +0100 |
|---|---|---|
| committer | Marijn Haverbeke <marijnh@gmail.com> | 2012-03-08 21:17:32 +0100 |
| commit | c71306b0dbdec6c8d6aaec06cb6770d5b0a2a7cc (patch) | |
| tree | 4b3a69f7b3e8af17f7049e4f3b48b1dbfa327579 /src/rustc/syntax/parse | |
| parent | fd465f91a89450b7daebecdde9c280a923bbe394 (diff) | |
| download | rust-c71306b0dbdec6c8d6aaec06cb6770d5b0a2a7cc.tar.gz rust-c71306b0dbdec6c8d6aaec06cb6770d5b0a2a7cc.zip | |
Explicitly store self_ids use for self locals in methods
This makes it possible to move them between crates without confusion, and to instantiate them at a point where the monomorphizing substitutions are known. Issue #1944
Diffstat (limited to 'src/rustc/syntax/parse')
| -rw-r--r-- | src/rustc/syntax/parse/parser.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rustc/syntax/parse/parser.rs b/src/rustc/syntax/parse/parser.rs index ec7b63926c9..69c28c3c904 100644 --- a/src/rustc/syntax/parse/parser.rs +++ b/src/rustc/syntax/parse/parser.rs @@ -1931,7 +1931,8 @@ fn parse_method(p: parser) -> @ast::method { let (inner_attrs, body) = parse_inner_attrs_and_block(p, true); let attrs = attrs + inner_attrs; @{ident: ident, attrs: attrs, tps: tps, decl: decl, body: body, - id: p.get_id(), span: ast_util::mk_sp(lo, body.span.hi)} + id: p.get_id(), span: ast_util::mk_sp(lo, body.span.hi), + self_id: p.get_id()} } fn parse_item_iface(p: parser, attrs: [ast::attribute]) -> @ast::item { |
