@@ -362,20 +362,17 @@ fn mk_fake_ident_interner() -> ident_interner {
362
362
/**
363
363
* All the valid words that have meaning in the Rust language.
364
364
*
365
- * Rust keywords are either 'temporary', 'restricted', or 'strict '. Temporary
365
+ * Rust keywords are either 'temporary', 'strict' or 'reserved '. Temporary
366
366
* keywords are contextual and may be used as identifiers anywhere. They are
367
- * expected to disappear from the grammar soon. Restricted keywords may not
368
- * appear in positions that might otherwise contain _value identifiers_.
369
- * Strict keywords may not appear as identifiers at all .
367
+ * expected to disappear from the grammar soon. Strict keywords may not
368
+ * appear as identifiers at all. Reserved keywords are not used anywhere in
369
+ * the language and may not appear as identifiers.
370
370
*/
371
371
fn keyword_table( ) -> HashMap < ~str , ( ) > {
372
372
let keywords = str_hash ( ) ;
373
373
for temporary_keyword_table( ) . each_key |word| {
374
374
keywords. insert( word, ( ) ) ;
375
375
}
376
- for restricted_keyword_table( ) . each_key |word| {
377
- keywords. insert( word, ( ) ) ;
378
- }
379
376
for strict_keyword_table( ) . each_key |word| {
380
377
keywords. insert( word, ( ) ) ;
381
378
}
@@ -397,30 +394,6 @@ fn temporary_keyword_table() -> HashMap<~str, ()> {
397
394
words
398
395
}
399
396
400
- /**
401
- * Keywords that may not appear in any position that might otherwise contain a
402
- * _value identifier_. Restricted keywords may still be used as other types of
403
- * identifiers.
404
- *
405
- * Reasons:
406
- *
407
- * * For some (most?), if used at the start of a line, they will cause the
408
- * line to be interpreted as a specific kind of statement, which would be
409
- * confusing.
410
- *
411
- * * `true` or `false` as identifiers would always be shadowed by
412
- * the boolean constants
413
- */
414
- fn restricted_keyword_table ( ) -> HashMap < ~str , ( ) > {
415
- let words = str_hash ( ) ;
416
- let keys = ~[
417
- ] ;
418
- for keys. each |word| {
419
- words. insert ( word, ( ) ) ;
420
- }
421
- words
422
- }
423
-
424
397
/// Full keywords. May not appear anywhere else.
425
398
fn strict_keyword_table( ) -> HashMap < ~str , ( ) > {
426
399
let words = str_hash( ) ;
0 commit comments