From eec6016ec3e0cc6be3ae75007586b6a56372b382 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Wed, 19 Jan 2022 18:26:16 -0800 Subject: [PATCH] Delete unused Display for pretty printer Token --- compiler/rustc_ast_pretty/src/pp.rs | 12 ------------ 1 file changed, 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,