Add print_trait_sugared

This commit is contained in:
Michael Goulet 2023-11-24 22:09:59 +00:00
parent 8a7b2035f8
commit b97ff8eb16
17 changed files with 91 additions and 56 deletions

View file

@ -2219,8 +2219,8 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
infer::ExistentialProjection(exp_found) => self.expected_found_str(exp_found),
infer::PolyTraitRefs(exp_found) => {
let pretty_exp_found = ty::error::ExpectedFound {
expected: exp_found.expected.print_only_trait_path(),
found: exp_found.found.print_only_trait_path(),
expected: exp_found.expected.print_trait_sugared(),
found: exp_found.found.print_trait_sugared(),
};
match self.expected_found_str(pretty_exp_found) {
Some((expected, found, _, _)) if expected == found => {