diff options
| author | David Tolnay <dtolnay@gmail.com> | 2020-05-15 09:35:46 -0700 |
|---|---|---|
| committer | David Tolnay <dtolnay@gmail.com> | 2020-05-15 09:35:46 -0700 |
| commit | bea2c59ea56cb3daa7e3bacabd7c95f002f9aca0 (patch) | |
| tree | a501b75d2f66f67c9a1af1b010fe00edfaa4d962 /src | |
| parent | 4c4b4c4ab407f0ccdfc71caf443735e5ba62539c (diff) | |
| download | rust-bea2c59ea56cb3daa7e3bacabd7c95f002f9aca0.tar.gz rust-bea2c59ea56cb3daa7e3bacabd7c95f002f9aca0.zip | |
Clarify use of format_args in Debug for Literal
Diffstat (limited to 'src')
| -rw-r--r-- | src/libproc_macro/bridge/client.rs | 1 |
1 files changed, 1 insertions, 0 deletions
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 |
