Skip to content

Commit

Permalink
Replace be with become
Browse files Browse the repository at this point in the history
As per rust-lang/rfcs#601, replace `be` with `become` as reserved
keyword for tail call optimization.
  • Loading branch information
ranma42 authored and Andrea Canciani committed Feb 4, 2015
1 parent 3b2ed14 commit 8f7c2d5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/doc/grammar.md
Expand Up @@ -157,7 +157,7 @@ token : simple_token | ident | literal | symbol | whitespace token ;

| | | | | |
|----------|----------|----------|----------|--------|
| abstract | alignof | as | be | box |
| abstract | alignof | as | become | box |
| break | const | continue | crate | do |
| else | enum | extern | false | final |
| fn | for | if | impl | in |
Expand Down
2 changes: 1 addition & 1 deletion src/doc/reference.md
Expand Up @@ -189,7 +189,7 @@ grammar as double-quoted strings. Other tokens have exact rules given.

| | | | | |
|----------|----------|----------|----------|---------|
| abstract | alignof | as | be | box |
| abstract | alignof | as | become | box |
| break | const | continue | crate | do |
| else | enum | extern | false | final |
| fn | for | if | impl | in |
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/parse/token.rs
Expand Up @@ -562,7 +562,7 @@ declare_special_idents_and_keywords! {
(45, Where, "where");
'reserved:
(46, Alignof, "alignof");
(47, Be, "be");
(47, Become, "become");
(48, Offsetof, "offsetof");
(49, Priv, "priv");
(50, Pure, "pure");
Expand Down
@@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
Expand All @@ -9,6 +9,6 @@
// except according to those terms.

fn main() {
let be = 0;
//~^ ERROR `be` is a reserved keyword
let become = 0;
//~^ ERROR `become` is a reserved keyword
}

0 comments on commit 8f7c2d5

Please sign in to comment.