From c71306b0dbdec6c8d6aaec06cb6770d5b0a2a7cc Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Wed, 7 Mar 2012 12:54:00 +0100 Subject: 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 --- src/rustc/syntax/parse/parser.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/rustc/syntax/parse') 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 { -- cgit 1.4.1-3-g733a5