From bea2c59ea56cb3daa7e3bacabd7c95f002f9aca0 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 15 May 2020 09:35:46 -0700 Subject: Clarify use of format_args in Debug for Literal --- src/libproc_macro/bridge/client.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libproc_macro') diff --git a/src/libproc_macro/bridge/client.rs b/src/libproc_macro/bridge/client.rs index a8f6a90ef76..283aa25b0ea 100644 --- a/src/libproc_macro/bridge/client.rs +++ b/src/libproc_macro/bridge/client.rs @@ -205,6 +205,7 @@ impl Clone for Literal { impl fmt::Debug for Literal { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("Literal") + // format the kind without quotes, as in `kind: Float` .field("kind", &format_args!("{}", &self.debug_kind())) .field("symbol", &self.symbol()) // format `Some("...")` on one line even in {:#?} mode -- cgit 1.4.1-3-g733a5