@@ -481,7 +481,7 @@ fn parse_ty(p: parser, colons_before_params: bool) -> @ast::ty {
481
481
} else if eat_word ( p, "fn" ) {
482
482
let proto = parse_fn_ty_proto ( p) ;
483
483
alt proto {
484
- ast : : proto_bare. { p. warn ( "fn is deprecated, use native fn" ) ; }
484
+ ast : : proto_bare. { p. fatal ( "fn is deprecated, use native fn" ) ; }
485
485
_ { /* fallthrough */ }
486
486
}
487
487
t = parse_ty_fn ( proto, p) ;
@@ -490,12 +490,6 @@ fn parse_ty(p: parser, colons_before_params: bool) -> @ast::ty {
490
490
} else if eat_word ( p, "native" ) {
491
491
expect_word ( p, "fn" ) ;
492
492
t = parse_ty_fn ( ast:: proto_bare, p) ;
493
- } else if eat_word ( p, "lambda" ) {
494
- p. warn ( "lambda is deprecated, use fn@" ) ;
495
- t = parse_ty_fn ( ast:: proto_box, p) ;
496
- } else if eat_word ( p, "sendfn" ) {
497
- p. warn ( "sendfn is deprecated, use fn~" ) ;
498
- t = parse_ty_fn ( ast:: proto_uniq, p) ;
499
493
} else if p. token == token:: MOD_SEP || is_ident ( p. token ) {
500
494
let path = parse_path ( p) ;
501
495
t = ast:: ty_path ( path, p. get_id ( ) ) ;
@@ -800,12 +794,6 @@ fn parse_bottom_expr(p: parser) -> pexpr {
800
794
ret pexpr ( parse_fn_expr ( p, proto) ) ;
801
795
} else if eat_word ( p, "block" ) {
802
796
ret pexpr ( parse_fn_expr ( p, ast:: proto_block) ) ;
803
- } else if eat_word ( p, "lambda" ) {
804
- //(breaks prettyprinting!) p.warn("lambda is deprecated, use fn@");
805
- ret pexpr ( parse_fn_expr ( p, ast:: proto_box) ) ;
806
- } else if eat_word ( p, "sendfn" ) {
807
- //(breaks prettyprinting!) p.warn("sendfn is deprecated, use fn~");
808
- ret pexpr ( parse_fn_expr ( p, ast:: proto_uniq) ) ;
809
797
} else if eat_word ( p, "unchecked" ) {
810
798
ret pexpr ( parse_block_expr ( p, lo, ast:: unchecked_blk) ) ;
811
799
} else if eat_word ( p, "unsafe" ) {
@@ -2067,14 +2055,29 @@ fn parse_item_tag(p: parser, attrs: [ast::attribute]) -> @ast::item {
2067
2055
}
2068
2056
2069
2057
fn parse_fn_ty_proto( p : parser ) -> ast:: proto {
2058
+ <<<<<<< HEAD
2070
2059
if p. token == token:: AT {
2071
2060
p. bump ( ) ;
2072
2061
ast:: proto_box
2073
2062
} else if p. token == token:: TILDE {
2063
+ =======
2064
+ alt p. peek ( ) {
2065
+ token:: AT . {
2066
+ p. bump ( ) ;
2067
+ ast:: proto_box
2068
+ }
2069
+ token:: TILDE . {
2070
+ >>>>>>> make blocks fn & and fn stand for "any closure"
2074
2071
p. bump( ) ;
2075
2072
ast:: proto_uniq
2076
- } else {
2073
+ }
2074
+ token:: BINOP ( token:: AND . ) {
2075
+ p. bump( ) ;
2076
+ ast:: proto_block
2077
+ }
2078
+ _ {
2077
2079
ast:: proto_bare
2080
+ }
2078
2081
}
2079
2082
}
2080
2083
0 commit comments