about summary refs log tree commit diff
path: root/src/comp/syntax/parse
diff options
context:
space:
mode:
authorHaitao Li <lihaitao@gmail.com>2011-11-14 21:06:39 +0800
committerHaitao Li <lihaitao@gmail.com>2011-11-16 23:45:07 +0800
commit3b683f52052b0cbf514c89a4da08df2b8e017fd4 (patch)
tree4c3452ea78ec5e4003743d87d8d2eb6835fd976e /src/comp/syntax/parse
parent73cd032df5d41a48ecae080950f4b3c10ef432f9 (diff)
rustc: Use link_name attribute for native function
Fixes issue #906
Diffstat (limited to 'src/comp/syntax/parse')
-rw-r--r--src/comp/syntax/parse/parser.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs
index 4fa5baa7af4..bb5bf4f7faa 100644
--- a/src/comp/syntax/parse/parser.rs
+++ b/src/comp/syntax/parse/parser.rs
@@ -1956,13 +1956,11 @@ fn parse_item_native_fn(p: parser, attrs: [ast::attribute],
     let lo = p.get_last_lo_pos();
     let t = parse_fn_header(p);
     let decl = parse_fn_decl(p, purity, ast::il_normal);
-    let link_name = none;
-    if p.peek() == token::EQ { p.bump(); link_name = some(parse_str(p)); }
     let hi = p.get_hi_pos();
     expect(p, token::SEMI);
     ret @{ident: t.ident,
           attrs: attrs,
-          node: ast::native_item_fn(link_name, decl, t.tps),
+          node: ast::native_item_fn(decl, t.tps),
           id: p.get_id(),
           span: ast_util::mk_sp(lo, hi)};
 }