about summary refs log tree commit diff
path: root/compiler/rustc_span
diff options
context:
space:
mode:
authorTakayuki Maeda <takoyaki0316@gmail.com>2022-06-07 02:33:23 +0900
committerTakayuki Maeda <takoyaki0316@gmail.com>2022-06-07 09:52:52 +0900
commit9db03b9bc8bdbc9cb0df8f022e61b97c1a6fc2ec (patch)
tree3e85069a5a4f413d3135157e0170fa8f519d1a44 /compiler/rustc_span
parent395a09c3dafe0c7838c9ca41d2b47bb5e79a5b6d (diff)
downloadrust-9db03b9bc8bdbc9cb0df8f022e61b97c1a6fc2ec.tar.gz
rust-9db03b9bc8bdbc9cb0df8f022e61b97c1a6fc2ec.zip
suggest swapping a struct and a trait
fmt
Diffstat (limited to 'compiler/rustc_span')
-rw-r--r--compiler/rustc_span/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs
index adf5a744048..456cf6dbe27 100644
--- a/compiler/rustc_span/src/lib.rs
+++ b/compiler/rustc_span/src/lib.rs
@@ -338,7 +338,7 @@ impl<'a> FileNameDisplay<'a> {
     pub fn to_string_lossy(&self) -> Cow<'a, str> {
         match self.inner {
             FileName::Real(ref inner) => inner.to_string_lossy(self.display_pref),
-            _ => Cow::from(format!("{}", self)),
+            _ => Cow::from(self.to_string()),
         }
     }
 }