Skip to content

Commit 7168e70

Browse files
committed
rustdoc: Strip methods correctly based on privacy
Beforehand the id of a method was the id of the 'self' argument, but this is not the id which privacy was using (the id of the ast::method) struct, so by moving the ids over to the privacy-target ones the methods are now stripped correctly.
1 parent df187a0 commit 7168e70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustdoc/clean.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ impl Clean<Item> for ast::method {
337337
name: Some(self.ident.clean()),
338338
attrs: self.attrs.clean(),
339339
source: self.span.clean(),
340-
id: self.self_id.clone(),
340+
id: self.id.clone(),
341341
visibility: self.vis.clean(),
342342
inner: MethodItem(Method {
343343
generics: self.generics.clean(),

0 commit comments

Comments
 (0)