diff options
| author | Dan Aloni <alonid@gmail.com> | 2020-08-28 13:38:43 +0300 |
|---|---|---|
| committer | Dan Aloni <alonid@gmail.com> | 2020-09-02 10:40:10 +0300 |
| commit | 75a042e74b797a74763db075b038284657b4a03a (patch) | |
| tree | 68f04e93f4da8948307ca4653754a3612d69b32d /compiler/rustc_trait_selection/src | |
| parent | e36e4bd0f7e722d3c97d1ca45387e58f81e4e8ea (diff) | |
| download | rust-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.rs | 4 |
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), } }) }; |
