diff options
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/lexer/mod.rs | 8 | ||||
| -rw-r--r-- | src/libsyntax/parse/token.rs | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index 4cdafb36eec..f9de55756b5 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -586,10 +586,10 @@ impl<'a> StringReader<'a> { /// `\x00` marker. #[inline(never)] fn scan_embedded_hygienic_ident(&mut self) -> ast::Ident { - fn bump_expecting_char<'a,D:fmt::Show>(r: &mut StringReader<'a>, - c: char, - described_c: D, - whence: &str) { + fn bump_expecting_char<'a,D:fmt::Debug>(r: &mut StringReader<'a>, + c: char, + described_c: D, + whence: &str) { match r.curr { Some(r_c) if r_c == c => r.bump(), Some(r_c) => panic!("expected {:?}, hit {:?}, {}", described_c, r_c, whence), diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index e5aef12e827..6112ee851ac 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -375,7 +375,7 @@ pub enum Nonterminal { NtTT(P<ast::TokenTree>), // needs P'ed to break a circularity } -impl fmt::Show for Nonterminal { +impl fmt::Debug for Nonterminal { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { NtItem(..) => f.pad("NtItem(..)"), @@ -651,15 +651,15 @@ impl BytesContainer for InternedString { } } -impl fmt::Show for InternedString { +impl fmt::Debug for InternedString { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - fmt::String::fmt(self, f) + fmt::Debug::fmt(&self.string[], f) } } -impl fmt::String for InternedString { +impl fmt::Display for InternedString { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "{}", &self.string[]) + fmt::Display::fmt(&self.string[], f) } } |
