diff options
| author | bors <bors@rust-lang.org> | 2014-11-09 03:51:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-11-09 03:51:41 +0000 |
| commit | a2f303ad098844351d08800038a4f99fa2ff0817 (patch) | |
| tree | 8ab2d0ef6dc8abb598082f43f8496911bdc4c470 /src/libsyntax/parse/token.rs | |
| parent | 93c85eb8bdcc910a27caf6abd20207a626ae98e5 (diff) | |
| parent | cf4e53eee7377b42524176f39b0b428175c74fb1 (diff) | |
| download | rust-a2f303ad098844351d08800038a4f99fa2ff0817.tar.gz rust-a2f303ad098844351d08800038a4f99fa2ff0817.zip | |
auto merge of #18743 : nikomatsakis/rust/hrtb-refactor-2, r=pcwalton
Various miscellaneous changes pushing towards HRTB support: 1. Update parser and adjust ast to support `for<'a,'b>` syntax, both in closures and trait bounds. Warn on the old syntax (not error, for stage0). 2. Refactor TyTrait representation to include a TraitRef. 3. Purge `once_fns` feature gate and `once` keyword. r? @pcwalton This is a [breaking-change]: - The `once_fns` feature is now officially deprecated. Rewrite using normal closures or unboxed closures. - The new `for`-based syntax now issues warnings (but not yet errors): - `fn<'a>(T) -> U` becomes `for<'a> fn(T) -> U` - `<'a> |T| -> U` becomes `for<'a> |T| -> U`
Diffstat (limited to 'src/libsyntax/parse/token.rs')
| -rw-r--r-- | src/libsyntax/parse/token.rs | 59 |
1 files changed, 29 insertions, 30 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index b0cca5e14de..f501a5831d2 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -503,42 +503,41 @@ declare_special_idents_and_keywords! { (27, Mod, "mod"); (28, Move, "move"); (29, Mut, "mut"); - (30, Once, "once"); - (31, Pub, "pub"); - (32, Ref, "ref"); - (33, Return, "return"); + (30, Pub, "pub"); + (31, Ref, "ref"); + (32, Return, "return"); // Static and Self are also special idents (prefill de-dupes) (super::STATIC_KEYWORD_NAME_NUM, Static, "static"); (super::SELF_KEYWORD_NAME_NUM, Self, "self"); - (34, Struct, "struct"); + (33, Struct, "struct"); (super::SUPER_KEYWORD_NAME_NUM, Super, "super"); - (35, True, "true"); - (36, Trait, "trait"); - (37, Type, "type"); - (38, Unsafe, "unsafe"); - (39, Use, "use"); - (40, Virtual, "virtual"); - (41, While, "while"); - (42, Continue, "continue"); - (43, Proc, "proc"); - (44, Box, "box"); - (45, Const, "const"); - (46, Where, "where"); + (34, True, "true"); + (35, Trait, "trait"); + (36, Type, "type"); + (37, Unsafe, "unsafe"); + (38, Use, "use"); + (39, Virtual, "virtual"); + (40, While, "while"); + (41, Continue, "continue"); + (42, Proc, "proc"); + (43, Box, "box"); + (44, Const, "const"); + (45, Where, "where"); 'reserved: - (47, Alignof, "alignof"); - (48, Be, "be"); - (49, Offsetof, "offsetof"); - (50, Priv, "priv"); - (51, Pure, "pure"); - (52, Sizeof, "sizeof"); - (53, Typeof, "typeof"); - (54, Unsized, "unsized"); - (55, Yield, "yield"); - (56, Do, "do"); - (57, Abstract, "abstract"); - (58, Final, "final"); - (59, Override, "override"); + (46, Alignof, "alignof"); + (47, Be, "be"); + (48, Offsetof, "offsetof"); + (49, Priv, "priv"); + (50, Pure, "pure"); + (51, Sizeof, "sizeof"); + (52, Typeof, "typeof"); + (53, Unsized, "unsized"); + (54, Yield, "yield"); + (55, Do, "do"); + (56, Abstract, "abstract"); + (57, Final, "final"); + (58, Override, "override"); } } |
