Add print_trait_sugared
This commit is contained in:
parent
8a7b2035f8
commit
b97ff8eb16
17 changed files with 91 additions and 56 deletions
|
@ -1182,10 +1182,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
|
|||
if let Some(bound_span) = bound_span {
|
||||
err.span_label(
|
||||
bound_span,
|
||||
format!(
|
||||
"ambiguous `{assoc_name}` from `{}`",
|
||||
bound.print_only_trait_path(),
|
||||
),
|
||||
format!("ambiguous `{assoc_name}` from `{}`", bound.print_trait_sugared(),),
|
||||
);
|
||||
if let Some(constraint) = &is_equality {
|
||||
where_bounds.push(format!(
|
||||
|
|
|
@ -106,6 +106,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
|
|||
trait here instead: `trait NewTrait: {} {{}}`",
|
||||
regular_traits
|
||||
.iter()
|
||||
// FIXME: This should `print_sugared`, but also needs to integrate projection bounds...
|
||||
.map(|t| t.trait_ref().print_only_trait_path().to_string())
|
||||
.collect::<Vec<_>>()
|
||||
.join(" + "),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue