-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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: hide macro export statements from docs #51011
Conversation
r? @frewsxcv (rust_highfive has picked a reviewer for you, use r? to override) |
r? @ollie27 |
Curses, rust-highfive hasn't reloaded the teams list. |
That's already a first fix so let's get it in. Thanks! @bors: r+ rollup |
📌 Commit d19b5ed has been approved by |
@@ -15,6 +15,7 @@ | |||
extern crate macros; | |||
|
|||
// @has pub_use_extern_macros/macro.bar.html | |||
// @!has pub_use_extern_macros/index.html 'pub use macros::bar;' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be something like // @!has pub_use_extern_macros/index.html '//code' 'pub use macros::bar;'
to actually test this. The other @!has
tests in this file need to be fixed in the same way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that's a good point! It looks like the 2-operator @has
command doesn't do any HTML parsing. I didn't realize that. >_>
@bors delegate=ollie27 I'm not sure whether bors has been updated with the new r+ permissions, so here's to make sure. |
✌️ @ollie27 can now approve this pull request |
1 similar comment
✌️ @ollie27 can now approve this pull request |
@bors: r+ |
📌 Commit 4cf0c5f has been approved by |
… r=ollie27 rustdoc: hide macro export statements from docs As mentioned in rust-lang#50647, rustdoc now prints both the import statement and the macro itself when re-exporting macros. This is a stopgap solution to clean up the std docs and get something small backported into beta. What this does: When rustdoc finds an export statement for a macro, instead of printing the export and bailing, now it will instead hide the export and bail. Until we can solve rust-lang#34843 or have a better way to find the attributes on an export statement when inlining macros, this will at least match the current behavior and clean up the re-export statements from the docs.
Rollup of 9 pull requests Successful merges: - #50864 (Add NetBSD/arm target specs) - #50956 (rust-gdb: work around the re-used -d argument in cgdb) - #50964 (Make sure that queries have predictable symbol names.) - #50965 (Update LLVM to pull in another wasm fix) - #50972 (Add -Z no-parallel-llvm flag) - #50979 (Fix span for type-only arguments) - #50981 (Shrink `LiveNode`.) - #50995 (move type out of unsafe block) - #51011 ( rustdoc: hide macro export statements from docs) Failed merges:
Nominating for beta so we can clean up the "Re-exports" section from the std docs. |
...I suppose to that end, i should ping @rust-lang/rustdoc to make sure everyone agrees on it. |
Ping @rust-lang/rustdoc! Can someone check this PR and approve it for beta backport? |
Paging @GuillaumeGomez @ollie27 @steveklabnik! Pending beta backport decision awaits your input! |
Let's do it. |
Let's backport! |
[beta] Process backports Merged and approved: * #50812: Fix issue #50811 (`NaN > NaN` was true). * #50827: Update LLVM to `56c931901cfb85cd6f7ed44c7d7520a8de1edf97` * #50879: Fix naming conventions for new lints * #51011: rustdoc: hide macro export statements from docs * #51051: prohibit turbofish in `impl Trait` methods * #51052: restore emplacement syntax (obsolete) * #51146: typeck: Do not pass the field check on field error * #51235: remove notion of Implicit derefs from mem-cat r? @ghost
[beta] Process backports Merged and approved: * #50812: Fix issue #50811 (`NaN > NaN` was true). * #50879: Fix naming conventions for new lints * #51011: rustdoc: hide macro export statements from docs * #51051: prohibit turbofish in impl Trait methods * #51052: restore emplacement syntax (obsolete) * #51146: typeck: Do not pass the field check on field error * #51235: remove notion of Implicit derefs from mem-cat r? @ghost
As mentioned in #50647, rustdoc now prints both the import statement and the macro itself when re-exporting macros. This is a stopgap solution to clean up the std docs and get something small backported into beta.
What this does: When rustdoc finds an export statement for a macro, instead of printing the export and bailing, now it will instead hide the export and bail. Until we can solve #34843 or have a better way to find the attributes on an export statement when inlining macros, this will at least match the current behavior and clean up the re-export statements from the docs.