Auto merge of #77524 - Patryk27:fixes/66228, r=estebank

Rework diagnostics for wrong number of generic args (fixes #66228 and #71924)

This PR reworks the `wrong number of {} arguments` message, so that it provides more details and contextual hints.
This commit is contained in:
bors 2021-01-13 20:35:58 +00:00
commit a62a76047e
121 changed files with 2787 additions and 766 deletions

View file

@ -847,7 +847,7 @@ fn foo(&self) -> Self::T { String::new() }
}
/// Given a slice of `hir::GenericBound`s, if any of them corresponds to the `trait_ref`
/// requirement, provide a strucuted suggestion to constrain it to a given type `ty`.
/// requirement, provide a structured suggestion to constrain it to a given type `ty`.
fn constrain_generic_bound_associated_type_structured_suggestion(
self,
db: &mut DiagnosticBuilder<'_>,