Skip to content
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

Don't render const keyword on stable #56845

Merged
merged 2 commits into from
Dec 20, 2018
Merged

Conversation

GuillaumeGomez
Copy link
Member

Fixes #55246.

Continuation of #55327.

r? @oli-obk

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 15, 2018
@oli-obk
Copy link
Contributor

oli-obk commented Dec 18, 2018

So I think I found the issue. The visit_fn function just takes the plain FnHeader from the HIR, which contains Constness irrelevant of stability.

Etiher the visit_fn method or the Clean impl for doctree::Function need to access the tcx to filter out the constness instead of just passing it down.

@GuillaumeGomez
Copy link
Member Author

Updated. Thanks a lot @oli-obk !

Copy link
Contributor

@oli-obk oli-obk left a comment

Choose a reason for hiding this comment

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

r=me with nix fixed

src/librustdoc/clean/mod.rs Outdated Show resolved Hide resolved
@GuillaumeGomez
Copy link
Member Author

Updated.

@oli-obk
Copy link
Contributor

oli-obk commented Dec 20, 2018

@bors r+

@bors
Copy link
Contributor

bors commented Dec 20, 2018

📌 Commit a6943d9 has been approved by oli-obk

@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 Dec 20, 2018
pietroalbini added a commit to pietroalbini/rust that referenced this pull request Dec 20, 2018
@bors
Copy link
Contributor

bors commented Dec 20, 2018

⌛ Testing commit a6943d9 with merge 09d6ab9...

bors added a commit that referenced this pull request Dec 20, 2018
Don't render const keyword on stable

Fixes #55246.

Continuation of #55327.

r? @oli-obk
@bors
Copy link
Contributor

bors commented Dec 20, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: oli-obk
Pushing 09d6ab9 to master...

@bors bors merged commit a6943d9 into rust-lang:master Dec 20, 2018
@GuillaumeGomez GuillaumeGomez deleted the const-docs branch December 20, 2018 22:26
@jyn514 jyn514 added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Sep 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

const fn shown in docs when not available
5 participants