diff options
| author | Agustin Chiappe Berrini <jnieve@gmail.com> | 2017-12-07 03:52:25 -0500 |
|---|---|---|
| committer | Agustin Chiappe Berrini <jnieve@gmail.com> | 2017-12-07 03:52:25 -0500 |
| commit | ce1fed7f52584d4a23ddbd8d464b046d840c654e (patch) | |
| tree | fa50e55a9471f16583d175c6ef53ef9818e1461c /src/libsyntax_pos | |
| parent | 65ccf24ce8e51b199d60d06ad41ea35f4cdee15c (diff) | |
| download | rust-ce1fed7f52584d4a23ddbd8d464b046d840c654e.tar.gz rust-ce1fed7f52584d4a23ddbd8d464b046d840c654e.zip | |
address comments
Diffstat (limited to 'src/libsyntax_pos')
| -rw-r--r-- | src/libsyntax_pos/symbol.rs | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/libsyntax_pos/symbol.rs b/src/libsyntax_pos/symbol.rs index c904e93e63a..0e90e0922b9 100644 --- a/src/libsyntax_pos/symbol.rs +++ b/src/libsyntax_pos/symbol.rs @@ -42,10 +42,6 @@ impl Ident { pub fn modern(self) -> Ident { Ident { name: self.name, ctxt: self.ctxt.modern() } } - - pub fn is_valid(&self) -> bool { - !self.name.is_used_keyword() && !self.name.is_unused_keyword() - } } impl fmt::Debug for Ident { @@ -122,20 +118,6 @@ impl Symbol { self.0 } - /// Returns `true` if the token is a keyword used in the language. - pub fn is_used_keyword(&self) -> bool { - self >= &keywords::As.name() && self <= &keywords::While.name() - } - - /// Returns `true` if the token is a keyword reserved for possible future use. - pub fn is_unused_keyword(&self) -> bool { - self >= &keywords::Abstract.name() && self <= &keywords::Yield.name() - } - - pub fn is_static_keyword(&self) -> bool { - self == &keywords::StaticLifetime.name() - } - pub fn without_first_quote(&self) -> Symbol { Symbol::from(self.as_str().trim_left_matches('\'')) } |
