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 dcd8c8e739

View File

@ -744,7 +744,7 @@ pub fn hash_tykind(&mut self, ty: &TyKind<'_>) {
}
for segment in path.segments {
segment.ident.name.hash(&mut self.s);
self.hash_generic_args(segment.generic_args().args);
self.hash_generic_args(segment.args().args);
}
},
QPath::TypeRelative(ref ty, ref segment) => {