-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Add pub visibility for methods as well #44554
Conversation
r=me pending travis |
@bors r+ rollup |
📌 Commit 42a0286 has been approved by |
The |
@ollie27: Good catch! |
However I have no idea how to test it... |
42a0286
to
08bb3dc
Compare
I'm not sure how to add tests for the indentation but a simple test like the following would be useful: #![crate_name = "foo"]
pub struct Foo;
impl Foo {
// @has 'foo/struct.Foo.html' '//code' 'pub fn f()'
pub fn f() {}
} |
I rummaged through the flags available to compiler tests and it looks like we can't add flags to rustdoc (to enable rendering private items), so for now that will have to do. |
@QuietMisdreavus do you mean like
|
Um, yes, exactly that. I didn't realize that the compile-flags worked like that. So yeah, that's what i had in mind to be able to test rendering |
Oh damn, I forgot to add the test file! Now I see what you're talking about... |
08bb3dc
to
2c59e77
Compare
I added the test. |
☔ The latest upstream changes (presumably #44585) made this pull request unmergeable. Please resolve the merge conflicts. |
795c559
to
7800fae
Compare
Could you add another bit to the test where it renders a non-pub function without "pub"? You can disable the |
7800fae
to
203d71f
Compare
(the test got updated to include a non-pub method, and travis passed, so:) @bors r+ |
📌 Commit 203d71f has been approved by |
…uietMisdreavus Add pub visibility for methods as well Fixes rust-lang#44527. r? @QuietMisdreavus
…uietMisdreavus Add pub visibility for methods as well Fixes rust-lang#44527. r? @QuietMisdreavus
Fixes #44527.
r? @QuietMisdreavus