Skip to content

Commit 09c707f

Browse files
committed
Display original pattern in rustdoc.
This commit displays the original pattern in generated documentation for async functions rather than the synthesized pattern.
1 parent 44ddbc5 commit 09c707f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustdoc/clean/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2017,7 +2017,7 @@ impl<'a> Clean<Arguments> for (&'a [hir::Ty], hir::BodyId) {
20172017
Arguments {
20182018
values: self.0.iter().enumerate().map(|(i, ty)| {
20192019
Argument {
2020-
name: name_from_pat(&body.arguments[i].pat),
2020+
name: name_from_pat(&body.arguments[i].original_pat()),
20212021
type_: ty.clean(cx),
20222022
}
20232023
}).collect()

0 commit comments

Comments
 (0)