about summary refs log tree commit diff
path: root/src/libsyntax/tokenstream.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-10-09 01:45:40 +0200
committerMazdak Farrokhzad <twingoow@gmail.com>2019-10-13 07:00:32 +0200
commitab8105ee9703882534203237b3a6494842d65a75 (patch)
treead991452866b6af27046a4df79195eea054564a4 /src/libsyntax/tokenstream.rs
parent742ec4b9bf7ae7d693da7fe75e5f974e0fafb9d0 (diff)
downloadrust-ab8105ee9703882534203237b3a6494842d65a75.tar.gz
rust-ab8105ee9703882534203237b3a6494842d65a75.zip
tokenstream: don't depend on pprust
Diffstat (limited to 'src/libsyntax/tokenstream.rs')
-rw-r--r--src/libsyntax/tokenstream.rs9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/libsyntax/tokenstream.rs b/src/libsyntax/tokenstream.rs
index bef12ed4fad..970bacdde13 100644
--- a/src/libsyntax/tokenstream.rs
+++ b/src/libsyntax/tokenstream.rs
@@ -14,7 +14,6 @@
 //! ownership of the original.
 
 use crate::parse::token::{self, DelimToken, Token, TokenKind};
-use crate::print::pprust;
 
 use syntax_pos::{BytePos, Span, DUMMY_SP};
 #[cfg(target_arch = "x86_64")]
@@ -23,7 +22,7 @@ use rustc_data_structures::sync::Lrc;
 use rustc_serialize::{Decoder, Decodable, Encoder, Encodable};
 use smallvec::{SmallVec, smallvec};
 
-use std::{fmt, iter, mem};
+use std::{iter, mem};
 
 #[cfg(test)]
 mod tests;
@@ -507,12 +506,6 @@ impl Cursor {
     }
 }
 
-impl fmt::Display for TokenStream {
-    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        f.write_str(&pprust::tts_to_string(self.clone()))
-    }
-}
-
 impl Encodable for TokenStream {
     fn encode<E: Encoder>(&self, encoder: &mut E) -> Result<(), E::Error> {
         self.trees().collect::<Vec<_>>().encode(encoder)