diff options
| author | David Tolnay <dtolnay@gmail.com> | 2022-01-19 18:26:16 -0800 |
|---|---|---|
| committer | David Tolnay <dtolnay@gmail.com> | 2022-01-19 18:31:36 -0800 |
| commit | eec6016ec3e0cc6be3ae75007586b6a56372b382 (patch) | |
| tree | a24469a0ca0b57928878bbf3fd4a795612a7828c | |
| parent | 237949b6c8e5b387e0a9d1e7a22e0397c95fe488 (diff) | |
| download | rust-eec6016ec3e0cc6be3ae75007586b6a56372b382.tar.gz rust-eec6016ec3e0cc6be3ae75007586b6a56372b382.zip | |
Delete unused Display for pretty printer Token
| -rw-r--r-- | compiler/rustc_ast_pretty/src/pp.rs | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/compiler/rustc_ast_pretty/src/pp.rs b/compiler/rustc_ast_pretty/src/pp.rs index bdd70148d85..8b7ea5d792d 100644 --- a/compiler/rustc_ast_pretty/src/pp.rs +++ b/compiler/rustc_ast_pretty/src/pp.rs @@ -137,7 +137,6 @@ mod ring; use ring::RingBuffer; use std::borrow::Cow; use std::collections::VecDeque; -use std::fmt; /// How to break. Described in more detail in the module docs. #[derive(Clone, Copy, PartialEq)] @@ -175,17 +174,6 @@ impl Token { } } -impl fmt::Display for Token { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match *self { - Token::String(ref s) => write!(f, "STR({},{})", s, s.len()), - Token::Break(_) => f.write_str("BREAK"), - Token::Begin(_) => f.write_str("BEGIN"), - Token::End => f.write_str("END"), - } - } -} - #[derive(Copy, Clone)] enum PrintStackBreak { Fits, |
