about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
diff options
context:
space:
mode:
authorDan Aloni <alonid@gmail.com>2020-08-28 13:38:43 +0300
committerDan Aloni <alonid@gmail.com>2020-09-02 10:40:10 +0300
commit75a042e74b797a74763db075b038284657b4a03a (patch)
tree68f04e93f4da8948307ca4653754a3612d69b32d /compiler/rustc_trait_selection/src
parente36e4bd0f7e722d3c97d1ca45387e58f81e4e8ea (diff)
downloadrust-75a042e74b797a74763db075b038284657b4a03a.tar.gz
rust-75a042e74b797a74763db075b038284657b4a03a.zip
Fix some unwanted uses of Debug formatting on user-facing messages
While formatting for user diagnostics used `Display` for all most cases,
some small amount of cases used `Debug` instead.  Until now, `Display`
and `Debug` yielded the same output for many types. However, with path
trimming, we want to show a shorter path for the user, these cases need
fixing.
Diffstat (limited to 'compiler/rustc_trait_selection/src')
-rw-r--r--compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs
index 28542d4b12e..3a3bc080b9e 100644
--- a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs
+++ b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs
@@ -1342,8 +1342,8 @@ impl<'a, 'tcx> InferCtxtPrivExt<'tcx> for InferCtxt<'a, 'tcx> {
                     .normalize(candidate)
                     .ok();
                 match normalized {
-                    Some(normalized) => format!("\n  {:?}", normalized.value),
-                    None => format!("\n  {:?}", candidate),
+                    Some(normalized) => format!("\n  {}", normalized.value),
+                    None => format!("\n  {}", candidate),
                 }
             })
         };