Skip to content

rustdoc: Implement is_primitive in terms of primitive_type() #84465

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
May 10, 2021

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Apr 23, 2021

Previously, they disagreed about what types were primitives.

r? @GuillaumeGomez

@jyn514 jyn514 added C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Apr 23, 2021
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 23, 2021
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member

It's now apparently considering a generic as primitive. Funny haha.

@jyn514
Copy link
Member Author

jyn514 commented Apr 23, 2021

The issue is that primitive_type treats any reference as a primitive: https://github.com/rust-lang/rust/blob/62437c78693795e1c7604480407ad698e2b8ba24/src/librustdoc/clean/types.rs#L1416. That seems wrong, I don't know why it would be necessary. I'll try removing it and see if it helps.

Previously, they disagreed about what types were primitives.

This also fixes a bug where rustdoc would mark any type with a reference
as a primitive.
@JohnCSimon JohnCSimon added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 9, 2021
@GuillaumeGomez
Copy link
Member

Thanks!

@bors: r+

@bors
Copy link
Collaborator

bors commented May 10, 2021

📌 Commit 909a33d 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 10, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request May 10, 2021
…laumeGomez

Rollup of 4 pull requests

Successful merges:

 - rust-lang#84465 (rustdoc: Implement `is_primitive` in terms of `primitive_type()`)
 - rust-lang#85118 (Use an SVG image for clipboard instead of unicode character)
 - rust-lang#85148 (Fix source code line number display and make it clickable again)
 - rust-lang#85152 (Adjust target search algorithm for rustlib path)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 205a0d3 into rust-lang:master May 10, 2021
@rustbot rustbot added this to the 1.54.0 milestone May 10, 2021
@jyn514 jyn514 deleted the primitive branch May 11, 2021 04:17
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. 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.

7 participants