Skip to content

Rustdoc render async function re-export - #64599

Merged
bors merged 5 commits into
rust-lang:masterfrom
csmoe:doc_async_reexport
Sep 25, 2019
Merged

Rustdoc render async function re-export#64599
bors merged 5 commits into
rust-lang:masterfrom
csmoe:doc_async_reexport

Conversation

@csmoe

Copy link
Copy Markdown
Contributor

@Centril

Copy link
Copy Markdown
Contributor

Won't this still render with -> impl Trait?

@csmoe

Copy link
Copy Markdown
ContributorAuthor

@Centril fixing associate_method, build_external_function seems not the one to blame.

@nikomatsakis

This comment has been minimized.

@rust-highfive

This comment has been minimized.

@nikomatsakisnikomatsakis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thanks @csmoe!

One question: can we adjust the query to be fn asyncness() instead of fn is_async_fn()?

Comment threadsrc/librustdoc/clean/inline.rs Outdated
Comment threadsrc/librustdoc/clean/mod.rs Outdated

@nikomatsakisnikomatsakis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, one other thing:

We don't have any test for this! Can you add a test?

Here is an example of such a test for async-fn (crate-local only, obviously):

https://github.com/rust-lang/rust/blob/master/src/test/rustdoc/async-fn.rs

and this is an example testing the cross-crate case specifically:

https://github.com/rust-lang/rust/blob/master/src/test/rustdoc/cross-crate-links.rs

but maybe @QuietMisdreavus can give some better examples of just the tests we want in this case.

(This is for the bug around async fn across crates, @QuietMisdreavus)

@JohnCSimonJohnCSimon added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Sep 21, 2019
Comment threadsrc/test/rustdoc/inline_cross/auxiliary/impl_trait_aux.rs Outdated
@csmoe

Copy link
Copy Markdown
ContributorAuthor

@nikomatsakis I added the tests into https://github.com/rust-lang/rust/blob/master/src/test/rustdoc/inline_cross/impl_trait.rs as it covers bare function and impl re-exports.

@csmoecsmoe added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 23, 2019

@nikomatsakisnikomatsakis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@csmoe great, thanks! I left a few more (quite small) nits.

r=me once fixed

Comment threadsrc/librustc/ty/mod.rs Outdated
Comment threadsrc/librustc/ty/mod.rs Outdated
Comment threadsrc/librustc_metadata/decoder.rs Outdated
@csmoe
csmoeforce-pushed the doc_async_reexport branch 2 times, most recently from a1587c5 to 04ffef1CompareSeptember 23, 2019 17:21
@rust-highfive

This comment has been minimized.

@nikomatsakis

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Sep 24, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit a744fd0 has been approved by nikomatsakis

@borsbors 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 Sep 24, 2019
@nikomatsakisnikomatsakis added beta-nominated Nominated for backporting to the compiler in the beta channel. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Sep 24, 2019
@nikomatsakis

Copy link
Copy Markdown
Contributor

I'm assuming this will not make the 1.39 beta cutoff. If so, I think we should consider backporting it, as it resolves a "quality" issue for async await. Basically, the rustdoc for library facades that make use of async fn looks bad (it doesn't show that they are async fn). I wouldn't ordinarily nominate such a thing for backport, I don't think, but since async fn is a high priority feature, we can expect a lot of eyes on it, so I think it might be worth considering.

@Centril

Copy link
Copy Markdown
Contributor

Yep, this won't make it to the cutoff as @Mark-Simulacrum is branching master to beta in an hour or so. Backporting this seems rather safe so it is reasonable I'd say.

Centril added a commit to Centril/rust that referenced this pull request Sep 25, 2019
@CentrilCentril mentioned this pull request Sep 25, 2019
bors added a commit that referenced this pull request Sep 25, 2019
Rollup of 7 pull requests
Successful merges:
- #64324 (rustc: Fix mixing crates with different `share_generics`)
- #64428 (Error explanation e0524)
- #64481 (A more explanatory thread local storage panic message)
- #64599 (Rustdoc render async function re-export)
- #64743 (Update cargo)
- #64746 (Remove blanket silencing of "type annotation needed" errors)
- #64753 (Don't emit explain with json short messages.)
Failed merges:
r? @ghost
@bors
bors merged commit a744fd0 into rust-lang:masterSep 25, 2019
@pnkfelix

Copy link
Copy Markdown
Contributor

discussed at T-compiler meeting. Approved for beta backport.

@pnkfelixpnkfelix added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Sep 26, 2019
Mark-Simulacrum pushed a commit to Mark-Simulacrum/rust that referenced this pull request Sep 26, 2019
@Mark-SimulacrumMark-Simulacrum removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Sep 26, 2019
bors added a commit that referenced this pull request Sep 27, 2019
[beta] switch to stable bootstrap and rollup backports
Contains the following:
* Account for the Zero sub-pattern case. #64748
* relnotes: make compatibility section more sterile and fix rustc version #64742
* Rustdoc render async function re-export #64599
* Update cargo #64773
* switches us to stable bootstrap (not dev-static) (no PR)
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta-acceptedAccepted for backporting to the compiler in the beta channel.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-rustdocRelevant 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.

rustdoc renders re-exported async fns incorrectly

9 participants

@csmoe@Centril@nikomatsakis@rust-highfive@bors@pnkfelix@tesuji@JohnCSimon@Mark-Simulacrum