diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2012-01-18 12:04:07 -0800 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2012-01-19 07:10:59 -0800 |
| commit | 1f0b3d2247ce6ff381f572450dbe733291ffe01a (patch) | |
| tree | 81684fe3aedb300ae6b4db297a06e6cfb9555176 /src/comp/syntax/parse | |
| parent | d54cc1cad4b913fd0a96091674175227ce9f021a (diff) | |
| download | rust-1f0b3d2247ce6ff381f572450dbe733291ffe01a.tar.gz rust-1f0b3d2247ce6ff381f572450dbe733291ffe01a.zip | |
treat fn*() as fn&()
This is not my ideal way of going about things. I'd prefer not to have expressions typed as fn*(), for example, but I couldn't get that to work together with inferring the modes of arguments and other corner cases.
Diffstat (limited to 'src/comp/syntax/parse')
| -rw-r--r-- | src/comp/syntax/parse/parser.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs index 0da193c2078..ee947772ab2 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -146,8 +146,8 @@ fn bad_expr_word_table() -> hashmap<str, ()> { for word in ["mod", "if", "else", "while", "do", "alt", "for", "break", "cont", "ret", "be", "fail", "type", "resource", "check", "assert", "claim", "native", "fn", "pure", - "unsafe", "block", "import", "export", "let", "const", - "log", "copy", "sendfn", "impl", "iface", "enum"] { + "unsafe", "import", "export", "let", "const", + "log", "copy", "impl", "iface", "enum"] { words.insert(word, ()); } words @@ -493,9 +493,6 @@ fn parse_ty(p: parser, colons_before_params: bool) -> @ast::ty { _ { /* fallthrough */ } } t = parse_ty_fn(proto, p); - } else if eat_word(p, "block") { - //p.warn("block is deprecated, use fn& or fn"); - t = parse_ty_fn(ast::proto_block, p); } else if eat_word(p, "native") { expect_word(p, "fn"); t = parse_ty_fn(ast::proto_bare, p); @@ -802,9 +799,6 @@ fn parse_bottom_expr(p: parser) -> pexpr { _ { /* fallthrough */ } } ret pexpr(parse_fn_expr(p, proto)); - } else if eat_word(p, "block") { - p.warn("block is deprecated, use fn& or fn"); - ret pexpr(parse_fn_expr(p, ast::proto_block)); } else if eat_word(p, "unchecked") { ret pexpr(parse_block_expr(p, lo, ast::unchecked_blk)); } else if eat_word(p, "unsafe") { |
