Skip to content

Conversation

QuietMisdreavus
Copy link
Contributor

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.

@rust-highfive
Copy link
Contributor

r? @frewsxcv

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 23, 2018
@QuietMisdreavus
Copy link
Contributor Author

r? @ollie27

@QuietMisdreavus
Copy link
Contributor Author

Curses, rust-highfive hasn't reloaded the teams list.

r? @GuillaumeGomez

@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented May 23, 2018

That's already a first fix so let's get it in. Thanks!

@bors: r+ rollup

@bors
Copy link
Collaborator

bors commented May 23, 2018

📌 Commit d19b5ed has been approved by GuillaumeGomez

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 23, 2018
@@ -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;'
Copy link
Contributor

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.

Copy link
Contributor Author

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. >_>

@QuietMisdreavus
Copy link
Contributor Author

QuietMisdreavus commented May 24, 2018

@bors delegate=ollie27

I'm not sure whether bors has been updated with the new r+ permissions, so here's to make sure.

@bors
Copy link
Collaborator

bors commented May 24, 2018

✌️ @ollie27 can now approve this pull request

1 similar comment
@bors
Copy link
Collaborator

bors commented May 24, 2018

✌️ @ollie27 can now approve this pull request

@ollie27
Copy link
Contributor

ollie27 commented May 24, 2018

@bors: r+

@bors
Copy link
Collaborator

bors commented May 24, 2018

📌 Commit 4cf0c5f has been approved by ollie27

kennytm added a commit to kennytm/rust that referenced this pull request May 24, 2018
… 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.
bors added a commit that referenced this pull request May 24, 2018
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:
@QuietMisdreavus QuietMisdreavus added the beta-nominated Nominated for backporting to the compiler in the beta channel. label May 24, 2018
@QuietMisdreavus
Copy link
Contributor Author

Nominating for beta so we can clean up the "Re-exports" section from the std docs.

@bors bors merged commit 4cf0c5f into rust-lang:master May 24, 2018
@QuietMisdreavus QuietMisdreavus added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label May 24, 2018
@QuietMisdreavus
Copy link
Contributor Author

...I suppose to that end, i should ping @rust-lang/rustdoc to make sure everyone agrees on it.

@QuietMisdreavus QuietMisdreavus deleted the duplicitous-macros branch May 24, 2018 14:32
@pietroalbini
Copy link
Member

Ping @rust-lang/rustdoc! Can someone check this PR and approve it for beta backport?

@QuietMisdreavus
Copy link
Contributor Author

Paging @GuillaumeGomez @ollie27 @steveklabnik! Pending beta backport decision awaits your input!

@steveklabnik
Copy link
Contributor

Let's do it.

@pietroalbini pietroalbini added the beta-accepted Accepted for backporting to the compiler in the beta channel. label May 31, 2018
@GuillaumeGomez
Copy link
Member

Let's backport!

bors added a commit that referenced this pull request Jun 1, 2018
[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
@pietroalbini pietroalbini removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jun 2, 2018
bors added a commit that referenced this pull request Jun 3, 2018
[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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants