Skip to content

Commit

Permalink
Display original pattern in rustdoc.
Browse files Browse the repository at this point in the history
This commit displays the original pattern in generated documentation for
async functions rather than the synthesized pattern.
  • Loading branch information
davidtwco committed Apr 21, 2019
1 parent 44ddbc5 commit 09c707f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustdoc/clean/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 09c707f

Please sign in to comment.