diff options
| author | bors <bors@rust-lang.org> | 2019-10-14 10:00:51 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-10-14 10:00:51 +0000 |
| commit | 446e5e57b667c841ba3ebb4b41b44fb98bd3af4b (patch) | |
| tree | b6cc0036da62d65162168901c85cf368d8ed440d /src/libsyntax/tokenstream.rs | |
| parent | d28a9c38fe14396e86ae274c7847e20ee0f78ca9 (diff) | |
| parent | a73e0731f45577bb6b760fe5d8d328de2021a74f (diff) | |
| download | rust-446e5e57b667c841ba3ebb4b41b44fb98bd3af4b.tar.gz rust-446e5e57b667c841ba3ebb4b41b44fb98bd3af4b.zip | |
Auto merge of #65399 - Centril:rollup-6lzj0w5, r=Centril
Rollup of 7 pull requests Successful merges: - #65215 (Add long error explanation for E0697) - #65292 (Print lifetimes with backticks) - #65362 (syntax: consolidate function parsing in item.rs) - #65363 (Remove implicit dependencies on syntax::pprust) - #65379 (refactor session::config::build_session_options_and_crate_config) - #65392 (Move `Nonterminal::to_tokenstream` to parser & don't rely directly on parser in lowering) - #65395 (Add some tests for fixed ICEs) Failed merges: r? @ghost
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) |
