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

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
@ollie27

This comment has been minimized.

Copy link
Contributor

ollie27 commented Feb 15, 2020

This looks good to me.

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 15, 2020

📌 Commit 8ee30db has been approved by ollie27

@bors

This comment has been minimized.

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

This comment has been minimized.

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 label Feb 16, 2020
@bors bors merged commit 8ee30db into rust-lang:master Feb 16, 2020
5 checks passed
5 checks passed
homu Test successful
Details
pr Build #20200202.42 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-7) Linux x86_64-gnu-llvm-7 succeeded
Details
pr (Linux x86_64-gnu-tools) Linux x86_64-gnu-tools succeeded
Details
@GuillaumeGomez GuillaumeGomez deleted the GuillaumeGomez:struct-variant-field-search branch Feb 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

6 participants
You can’t perform that action at this time.