diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-10-14 07:36:57 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-14 07:36:57 +0200 |
| commit | 2800bc240e1f4789bb54080b4cd30ec382a1337f (patch) | |
| tree | 096134e6e2b215f002d35e23368efb172be0f076 /src/libsyntax/tokenstream.rs | |
| parent | 66e428824b133078faa187b1f6f0546e2211de16 (diff) | |
| parent | ab8105ee9703882534203237b3a6494842d65a75 (diff) | |
| download | rust-2800bc240e1f4789bb54080b4cd30ec382a1337f.tar.gz rust-2800bc240e1f4789bb54080b4cd30ec382a1337f.zip | |
Rollup merge of #65363 - Centril:less-pprust, r=Mark-Simulacrum
Remove implicit dependencies on syntax::pprust Part of https://github.com/rust-lang/rust/pull/65324. The main goal here is to facilitate the eventual move of pprust out from libsyntax and because an AST definition typically should not depend on its pretty printer. r? @estebank
Diffstat (limited to 'src/libsyntax/tokenstream.rs')
| -rw-r--r-- | src/libsyntax/tokenstream.rs | 9 |
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) |
