Do not talk about "trait <Foo = Bar>
"
Pass in an appropriate `Option<DefId>` in more cases from hir ty lowering.
This commit is contained in:
parent
af09423967
commit
b466405890
9 changed files with 21 additions and 13 deletions
|
@ -279,7 +279,13 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
|
|||
} else {
|
||||
let mut err = self.dcx().create_err(err);
|
||||
if suggest_constraining_type_param(
|
||||
tcx, generics, &mut err, &qself_str, &trait_ref, None, None,
|
||||
tcx,
|
||||
generics,
|
||||
&mut err,
|
||||
&qself_str,
|
||||
&trait_ref,
|
||||
Some(best_trait),
|
||||
None,
|
||||
) && !identically_named
|
||||
{
|
||||
// We suggested constraining a type parameter, but the associated item on it
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue