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.
This commit is contained in:
Dan Aloni 2020-08-28 13:38:43 +03:00
parent e36e4bd0f7
commit 75a042e74b
7 changed files with 19 additions and 18 deletions

View file

@ -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),
}
})
};