-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rustdoc generates docs for hidden methods in impls #36035
Comments
Current status: Still a problem. Rustdoc doesn't scan the visibility of items inside a trait implementation, and in fact doesn't even check against a trait definition when printing an implementation. This leads to odd situations where if you have the This is because the pass in rustdoc that strips out private or hidden items doesn't check "tymethods" for visibility at all: rust/src/librustdoc/passes/mod.rs Lines 249 to 250 in 248745a
And the part that renders the final impl onto the page doesn't check visibility either. Looking at your sample and the code again, i think i can see what's happening:
That partially explains why you need |
I've just stumbled upon this GitHub issue. I am actually convinced that one shouldn't be allowed to place For context, I actually went so far as to implement a lint for this (#96008, #97208) but I later had to remove it (#98336) basically because in some cases it actually does get hidden (#96890). Just FYI for people stopping by reading this issue. |
I've seen #34025, but in the following case
rustdoc
still generates documentation forhidden()
in theimpl Bar for Foo
(but astymethod
instead ofmethod
). It works correctly ifhidden()
is also marked as hidden in the trait definition.rustc -V
:rustc 1.13.0-nightly (e9bc1bac8 2016-08-24)
The text was updated successfully, but these errors were encountered: