Skip to content

Add links for primitives in "jump to definition" feature - #88033

Merged
bors merged 2 commits into
rust-lang:masterfrom
GuillaumeGomez:jump-to-def-primitive
Sep 14, 2021
Merged

Add links for primitives in "jump to definition" feature#88033
bors merged 2 commits into
rust-lang:masterfrom
GuillaumeGomez:jump-to-def-primitive

Conversation

@GuillaumeGomez

@GuillaumeGomezGuillaumeGomez commented Aug 14, 2021

Copy link
Copy Markdown
Member

Follow-up of #84176.

I created a function primitive_from_str which is code that was originally in collect_intra_doc_links::resolve_primitive to prevent code duplication.

I also created the primitive_link_url function which is somewhat similar to primitive_link but too much different to merge both of them.

Part of #89095.

r? @jyn514

@GuillaumeGomezGuillaumeGomez added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Aug 14, 2021
@rust-highfive

Copy link
Copy Markdown
Contributor

Some changes occurred in intra-doc-links.

cc @jyn514

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 14, 2021
Comment threadsrc/librustdoc/html/format.rs Outdated
Comment threadsrc/librustdoc/html/format.rs Outdated
Comment threadsrc/librustdoc/html/format.rs Outdated
@jyn514jyn514 added the A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name label Aug 14, 2021

@jyn514jyn514 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this may be fixed without having to add all this extra work once #87073 is merged - do you mind waiting for that? You could also try rebasing over that in the meantime to see if the tests pass without your changes.

Comment threadsrc/librustdoc/html/format.rs Outdated
@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

I think this may be fixed without having to add all this extra work once #87073 is merged - do you mind waiting for that? You could also try rebasing over that in the meantime to see if the tests pass without your changes.

I'm totally fine with waiting for it!

@JohnCSimonJohnCSimon 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 Sep 6, 2021
@JohnCSimon

Copy link
Copy Markdown

triage: fyi #87073 is still open

@jyn514jyn514 added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 6, 2021
@GuillaumeGomezGuillaumeGomez added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Sep 13, 2021
@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

#87073 has been merged, the PR has been rebased and updated to take the changes into account making it much smaller. Ready for the next review round! :)

Comment threadsrc/librustdoc/html/render/span_map.rs Outdated
Comment threadsrc/librustdoc/html/render/span_map.rs Outdated
Comment threadsrc/test/rustdoc/check-source-code-urls-to-def.rs Outdated
@jyn514

Copy link
Copy Markdown
Member

You're right, this is a lot simpler now :)

@jyn514jyn514 added requires-nightly This issue requires a nightly compiler in some way. When possible, use a F-* label instead. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 13, 2021
Comment threadsrc/librustdoc/clean/utils.rs Outdated
Comment threadsrc/librustdoc/html/highlight.rs Outdated
Comment threadsrc/librustdoc/html/render/span_map.rs Outdated
Comment threadsrc/test/rustdoc/check-source-code-urls-to-def-std.rs Outdated
@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

Updated!

@jyn514

Copy link
Copy Markdown
Member

r=me once CI is passing

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

@bors: r=jyn514

@bors

bors commented Sep 13, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit d73c0a3 has been approved by jyn514

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 13, 2021
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Sep 13, 2021
…e, r=jyn514
Add links for primitives in "jump to definition" feature
Follow-up of rust-lang#84176.
I created a function `primitive_from_str` which is code that was originally in `collect_intra_doc_links::resolve_primitive` to prevent code duplication.
I also created the `primitive_link_url` function which is somewhat similar to `primitive_link` but too much different to merge both of them.
r? `@jyn514`
This was referenced Sep 13, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 14, 2021
…laumeGomez
Rollup of 7 pull requests
Successful merges:
- rust-lang#88033 (Add links for primitives in "jump to definition" feature)
- rust-lang#88722 (Make `UnsafeCell::get_mut` const)
- rust-lang#88851 (Fix duplicate bounds for const_trait_impl)
- rust-lang#88859 (interpreter PointerArithmetic: use new Size helper methods)
- rust-lang#88885 (Fix jump def background)
- rust-lang#88894 (Improve error message for missing trait in trait impl)
- rust-lang#88896 (Reduce possibility of flaky tests)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit b3bb786 into rust-lang:masterSep 14, 2021
@rustbotrustbot added this to the 1.57.0 milestone Sep 14, 2021
@GuillaumeGomez
GuillaumeGomez deleted the jump-to-def-primitive branch September 14, 2021 11:55
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by namerequires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.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.

6 participants

@GuillaumeGomez@rust-highfive@JohnCSimon@jyn514@bors@rustbot