Turn some functions from token.rs into methods on Ident

This commit is contained in:
Vadim Petrochenkov
2018-05-13 16:14:43 +03:00
parent f4cbc2388f
commit c4352ff198
10 changed files with 80 additions and 67 deletions

View File

@@ -2374,7 +2374,7 @@ impl<'a> State<'a> {
}
pub fn print_ident(&mut self, ident: ast::Ident) -> io::Result<()> {
if token::is_raw_guess(ident) {
if ident.is_raw_guess() {
self.s.word(&format!("r#{}", ident))?;
} else {
self.s.word(&ident.name.as_str())?;