Display original pattern in rustdoc.

This commit displays the original pattern in generated documentation for
async functions rather than the synthesized pattern.
This commit is contained in:
David Wood 2019-04-21 14:33:28 +01:00
parent 44ddbc5565
commit 09c707f0ca
No known key found for this signature in database
GPG key ID: 01760B4F9F53F154

View file

@ -2017,7 +2017,7 @@ impl<'a> Clean<Arguments> for (&'a [hir::Ty], hir::BodyId) {
Arguments {
values: self.0.iter().enumerate().map(|(i, ty)| {
Argument {
name: name_from_pat(&body.arguments[i].pat),
name: name_from_pat(&body.arguments[i].original_pat()),
type_: ty.clean(cx),
}
}).collect()