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

Struct variant field search #68668

Merged
merged 3 commits into from
Feb 16, 2020

Conversation

GuillaumeGomez
Copy link
Member

Fixes #16017.

Reopening of #64724.

cc @tomjakubowski
cc @ollie27

r? @kinnison

On the backend, rustdoc now emits `paths` entries to a crate's search
index for struct-like enum variants, and index items of type structfield
which belong to such variants point to their variant parents in the
`paths` table, rather than their enum grandparents.  The path entry for
a variant is the fully qualified module path plus the enum name.

On the frontend, the search code recognizes structfields belonging to
structlike variants in the `paths` table and re-constructs the URL to
the field's anchor on the enum documentation page.

closes rust-lang#16017
@kinnison
Copy link
Contributor

kinnison commented Feb 1, 2020

I've built and verified this works against a local trivial test case. For some reason I failed to run the JS tests locally, I must be missing something.

Copy link
Contributor

@kinnison kinnison left a comment

Choose a reason for hiding this comment

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

The change looks sane, though as I said I can't verify the test case per-se

@kinnison
Copy link
Contributor

kinnison commented Feb 1, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Feb 1, 2020

📌 Commit 862af62 has been approved by kinnison

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Feb 1, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Feb 1, 2020
…-search, r=kinnison

Struct variant field search

Fixes rust-lang#16017.

Reopening of rust-lang#64724.

cc @tomjakubowski
cc @ollie27

r? @kinnison
@bors
Copy link
Contributor

bors commented Feb 1, 2020

⌛ Testing commit 862af62 with merge e7580348ea0e0747a8775b1df6ea22ddd63a9d56...

JohnTitor added a commit to JohnTitor/rust that referenced this pull request Feb 1, 2020
…-search, r=kinnison

Struct variant field search

Fixes rust-lang#16017.

Reopening of rust-lang#64724.

cc @tomjakubowski
cc @ollie27

r? @kinnison
@JohnTitor
Copy link
Member

@bors retry rolledup

@bors
Copy link
Contributor

bors commented Feb 1, 2020

⌛ Testing commit 862af62 with merge 6c85a17e145d1c6fa36a02de58c81c5103ca00ca...

@JohnTitor
Copy link
Member

Failed in #68747 (comment)
@bors retry r-

@bors bors added 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 1, 2020
@GuillaumeGomez GuillaumeGomez force-pushed the struct-variant-field-search branch from 862af62 to 8ee30db Compare February 2, 2020 18:19
@ollie27
Copy link
Member

ollie27 commented Feb 15, 2020

This looks good to me.

@bors r+

@bors
Copy link
Contributor

bors commented Feb 15, 2020

📌 Commit 8ee30db has been approved by ollie27

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 15, 2020
@bors
Copy link
Contributor

bors commented Feb 15, 2020

⌛ Testing commit 8ee30db with merge 8ba3ca0...

bors added a commit that referenced this pull request Feb 15, 2020
…ollie27

Struct variant field search

Fixes #16017.

Reopening of #64724.

cc @tomjakubowski
cc @ollie27

r? @kinnison
@bors
Copy link
Contributor

bors commented Feb 16, 2020

☀️ Test successful - checks-azure
Approved by: ollie27
Pushing 8ba3ca0 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 16, 2020
@bors bors merged commit 8ee30db into rust-lang:master Feb 16, 2020
@GuillaumeGomez GuillaumeGomez deleted the struct-variant-field-search branch February 17, 2020 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rustdoc: Struct variant fields don't have the right path in the search index
6 participants