diff options
| author | Lymia Aluysia <lymia@lymiahugs.com> | 2018-03-22 10:34:51 -0500 |
|---|---|---|
| committer | Lymia Aluysia <lymia@lymiahugs.com> | 2018-03-22 10:34:51 -0500 |
| commit | bfb94ac5f43ac7fb0736185421f6135fe7043a2e (patch) | |
| tree | 87d5410f878632d632d6245898ec3500ffd69dbe /src/libsyntax/parse | |
| parent | ce84a41936e367dfeb7d348564f2337819395ca6 (diff) | |
| download | rust-bfb94ac5f43ac7fb0736185421f6135fe7043a2e.tar.gz rust-bfb94ac5f43ac7fb0736185421f6135fe7043a2e.zip | |
Clean up raw identifier handling when recovering tokens from AST.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/token.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index 4e7a282adc5..7798a7a77ee 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -236,7 +236,7 @@ impl Token { /// Recovers a `Token` from an `ast::Ident`. This creates a raw identifier if necessary. pub fn from_ast_ident(ident: ast::Ident) -> Token { - Ident(ident, is_reserved_ident(ident)) + Ident(ident, is_reserved_ident(ident) && !is_path_segment_keyword(ident)) } /// Returns `true` if the token starts with '>'. |
