Skip to content
Please note that GitHub no longer supports Internet Explorer.

We recommend upgrading to the latest Microsoft Edge, Google Chrome, or Firefox.

Learn more
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

Open
wants to merge 3 commits into
base: master
from

Conversation

@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Jan 30, 2020

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 #16017
@kinnison

This comment has been minimized.

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 left a comment

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

@kinnison

This comment has been minimized.

Copy link
Contributor

kinnison commented Feb 1, 2020

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 1, 2020

📌 Commit 862af62 has been approved by kinnison

Dylan-DPC added a commit to Dylan-DPC/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 added a commit that referenced this pull request Feb 1, 2020
…kinnison

Struct variant field search

Fixes #16017.

Reopening of #64724.

cc @tomjakubowski
cc @ollie27

r? @kinnison
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 1, 2020

⌛️ Testing commit 862af62 with merge e758034...

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

This comment has been minimized.

Copy link
Member

JohnTitor commented Feb 1, 2020

@bors retry rolledup

bors added a commit that referenced this pull request Feb 1, 2020
Rollup of 7 pull requests

Successful merges:

 - #68460 (Use BufWriter for emitting MIR)
 - #68668 (Struct variant field search)
 - #68688 ([docs] remind bug reporters to update nightly)
 - #68704 (Ignore `build` dir formatting)
 - #68711 (Added upper bound of what vecs and boxes can allocate)
 - #68727 (Remove a comment about pretty printer in formatting tests)
 - #68740 (Do not suggest things named underscore)

Failed merges:

r? @ghost
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 1, 2020

⌛️ Testing commit 862af62 with merge 6c85a17...

bors added a commit that referenced this pull request Feb 1, 2020
…kinnison

Struct variant field search

Fixes #16017.

Reopening of #64724.

cc @tomjakubowski
cc @ollie27

r? @kinnison
@JohnTitor

This comment has been minimized.

Copy link
Member

JohnTitor commented Feb 1, 2020

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

@GuillaumeGomez GuillaumeGomez force-pushed the GuillaumeGomez:struct-variant-field-search branch from 862af62 to 8ee30db Feb 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.