Skip to content

Conversation

Dylan-DPC
Copy link
Member

@Dylan-DPC Dylan-DPC commented Jun 5, 2022

Rework of #92745

Instead of generating #impl, #impl-1, etc., generate IDs
like #impl-Foo<M>.

Co-authored-by: Noah Lev [email protected]

r? @GuillaumeGomez
cc @pierwill @camelid

Instead of generating `#impl`, `#impl-1`, etc., generate IDs
like `#impl-Foo<M>`.

Co-authored-by: Noah Lev <[email protected]>
@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jun 5, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 5, 2022
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@@ -11,7 +11,8 @@ pub struct Bar {
pub struct Foo<T: ?Sized>(T);

// @has foo/struct.Unsized.html
// @has - '//*[@id="impl-Sized"]//h3[@class="code-header in-band"]' 'impl !Sized for Unsized'
// @has - '//div[@id="impl-Sized-for-Unsized"]//h3[@class="code-header in-band"]' 'impl !Sized for Unsized'
>>>>>>> 083cf2a97a8... rustdoc: Add more semantic information to impl ids
Copy link
Member

Choose a reason for hiding this comment

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

You failed a rebase. ;)

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-12 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Check compiletest suite=rustdoc mode=rustdoc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
warning: `tidy` is not installed; diffs will not be generated

running 529 tests
i.....................F...............F.......F.............i........................... 88/529
........F..........................F........F........................................... 176/529
.............F.......................................................................... 352/529
.............F.......................................................................... 352/529
.F..i........................................................F..............i..........F 440/529
.............F.....F.................................................................... 528/529
failures:
Some tests failed in compiletest suite=rustdoc mode=rustdoc host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu

---- [rustdoc] src/test/rustdoc/blanket-reexport-item.rs stdout ----
---- [rustdoc] src/test/rustdoc/blanket-reexport-item.rs stdout ----

error: htmldocck failed!
status: exit status: 1
command: "/usr/bin/python3" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/blanket-reexport-item" "/checkout/src/test/rustdoc/blanket-reexport-item.rs"
stdout: none
--- stderr -------------------------------
3: @has check failed
 `XPATH PATTERN` did not match
 // @has foo/struct.S.html '//div[@id="impl-Into%3CU%3E-for-S"]//h3[@class="code-header in-band"]' 'impl<T, U> Into<U> for T'
Encountered 1 errors
------------------------------------------



---- [rustdoc] src/test/rustdoc/const-generics/const-impl.rs stdout ----

error: htmldocck failed!
status: exit status: 1
command: "/usr/bin/python3" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/const-generics/const-impl" "/checkout/src/test/rustdoc/const-generics/const-impl.rs"
stdout: none
--- stderr -------------------------------
12: @has check failed
 `XPATH PATTERN` did not match
 // @has foo/struct.VSet.html '//div[@id="impl-Send-for-VSet%3CT%2C%20ORDER%3E"]/h3[@class="code-header in-band"]' 'impl<T, const ORDER: Order> Send for VSet<T, ORDER>'
13: @has check failed
 `XPATH PATTERN` did not match
 // @has foo/struct.VSet.html '//div[@id="impl-Sync-for-VSet%3CT%2C%20ORDER%3E"]/h3[@class="code-header in-band"]' 'impl<T, const ORDER: Order> Sync for VSet<T, ORDER>'
18: @has check failed
 `XPATH PATTERN` did not match
 // @has foo/struct.VSet.html '//div[@id="impl-VSet%3CT%2C%20{%20Order%3A%3ASorted%20}%3E"]/h3[@class="code-header in-band"]' 'impl<T> VSet<T, { Order::Sorted }>'
25: @has check failed
 `XPATH PATTERN` did not match
 // @has foo/struct.VSet.html '//div[@id="impl-VSet%3CT%2C%20{%20Order%3A%3AUnsorted%20}%3E"]/h3[@class="code-header in-band"]' 'impl<T> VSet<T, { Order::Unsorted }>'
34: @has check failed
 `XPATH PATTERN` did not match
 // @has foo/struct.Escape.html '//div[@id="impl-Escape%3Cr#%22%3Cscript%3Ealert(%22Escape%22)%3B%3C/script%3E%22#%3E"]/h3[@class="code-header in-band"]' 'impl Escape<r#"<script>alert("Escape");</script>"#>'
Encountered 5 errors
------------------------------------------



---- [rustdoc] src/test/rustdoc/const-generics/const-generics-docs.rs stdout ----

error: htmldocck failed!
status: exit status: 1
command: "/usr/bin/python3" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/const-generics/const-generics-docs" "/checkout/src/test/rustdoc/const-generics/const-generics-docs.rs"
stdout: none
--- stderr -------------------------------
39: @has check failed
 `XPATH PATTERN` did not match
 // @has foo/struct.Foo.html '//div[@id="impl-Foo%3CM%3E"]/h3[@class="code-header in-band"]' 'impl<const M: usize> Foo<M> where u8: Trait<M>'
50: @has check failed
 `XPATH PATTERN` did not match
 // @has foo/struct.Bar.html '//div[@id="impl-Bar%3Cu8%2C%20M%3E"]/h3[@class="code-header in-band"]' 'impl<const M: usize> Bar<u8, M>'
Encountered 2 errors
------------------------------------------



---- [rustdoc] src/test/rustdoc/empty-impls.rs stdout ----

error: htmldocck failed!
status: exit status: 1
command: "/usr/bin/python3" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/empty-impls" "/checkout/src/test/rustdoc/empty-impls.rs"
stdout: none
--- stderr -------------------------------
4: @has check failed
 `XPATH PATTERN` did not match
 // @has - '//div[@id="synthetic-implementations-list"]/div[@id="impl-Send-for-Foo"]' 'impl Send for Foo'
9: @has check failed
 `XPATH PATTERN` did not match
 // @has - '//div[@id="trait-implementations-list"]/div[@id="impl-EmptyTrait-for-Foo"]' 'impl EmptyTrait for Foo'
16: @has check failed
 `XPATH PATTERN` did not match
 // @has - '//div[@id="trait-implementations-list"]/details/summary/div[@id="impl-NotEmpty-for-Foo"]' 'impl NotEmpty for Foo'
Encountered 3 errors
------------------------------------------



---- [rustdoc] src/test/rustdoc/generic-impl.rs stdout ----

error: htmldocck failed!
status: exit status: 1
command: "/usr/bin/python3" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/generic-impl" "/checkout/src/test/rustdoc/generic-impl.rs"
stdout: none
--- stderr -------------------------------
8: @has check failed
 `XPATH PATTERN` did not match
 // @has foo/struct.Foo.html '//div[@id="impl-ToString-for-Foo"]//h3[@class="code-header in-band"]' 'impl<T> ToString for T'
Encountered 1 errors
------------------------------------------



---- [rustdoc] src/test/rustdoc/impl-box.rs stdout ----

error: htmldocck failed!
status: exit status: 1
command: "/usr/bin/python3" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/impl-box" "/checkout/src/test/rustdoc/impl-box.rs"
stdout: none
--- stderr -------------------------------
8: @has check failed
 `XPATH PATTERN` did not match
 // @has '-' '//*[@id="impl-Iterator"]' 'impl Iterator for Box<MyType>'
Encountered 1 errors
------------------------------------------



---- [rustdoc] src/test/rustdoc/issue-29503.rs stdout ----

error: htmldocck failed!
status: exit status: 1
command: "/usr/bin/python3" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/issue-29503" "/checkout/src/test/rustdoc/issue-29503.rs"
stdout: none
--- stderr -------------------------------
8: @has check failed
 `XPATH PATTERN` did not match
 // @has - "//div[@id='implementors-list']//div[@id='impl-MyTrait-for-T']//h3[@class='code-header in-band']" "impl<T> MyTrait for T where T: Debug"
Encountered 1 errors
------------------------------------------



---- [rustdoc] src/test/rustdoc/issue-75588.rs stdout ----

error: htmldocck failed!
status: exit status: 1
command: "/usr/bin/python3" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/issue-75588" "/checkout/src/test/rustdoc/issue-75588.rs"
stdout: none
--- stderr -------------------------------
16: @has check failed
 `XPATH PATTERN` did not match
 // @has foo/trait.Join.html '//*[@id="impl-Join"]//h3[@class="code-header in-band"]' 'impl Join for Foo'
Encountered 1 errors
------------------------------------------



---- [rustdoc] src/test/rustdoc/primitive/primitive-generic-impl.rs stdout ----

error: htmldocck failed!
status: exit status: 1
command: "/usr/bin/python3" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/primitive/primitive-generic-impl" "/checkout/src/test/rustdoc/primitive/primitive-generic-impl.rs"
stdout: none
--- stderr -------------------------------
4: @has check failed
 `XPATH PATTERN` did not match
 // @has foo/primitive.i32.html '//div[@id="impl-ToString-for-i32"]//h3[@class="code-header in-band"]' 'impl<T> ToString for T'
Encountered 1 errors
------------------------------------------



---- [rustdoc] src/test/rustdoc/rfc-2632-const-trait-impl.rs stdout ----

error: htmldocck failed!
status: exit status: 1
command: "/usr/bin/python3" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/rfc-2632-const-trait-impl" "/checkout/src/test/rustdoc/rfc-2632-const-trait-impl.rs"
stdout: none
--- stderr -------------------------------
33: @has check failed
 `XPATH PATTERN` did not match
 // @has - '//section[@id="impl-Tr%3CT%3E"]/h3[@class="code-header in-band"]/a[@class="trait"]' 'Clone'
35: @has check failed
 `XPATH PATTERN` did not match
 // @has - '//section[@id="impl-Tr%3CT%3E"]/h3[@class="code-header in-band"]/span[@class="where fmt-newline"]' ': Clone'
Encountered 2 errors
------------------------------------------



---- [rustdoc] src/test/rustdoc/sized_trait.rs stdout ----

error: htmldocck failed!
status: exit status: 1
command: "/usr/bin/python3" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/sized_trait" "/checkout/src/test/rustdoc/sized_trait.rs"
stdout: none
--- stderr -------------------------------
14: @has check failed
 `XPATH PATTERN` did not match
 // @has - '//div[@id="impl-Sized-for-Unsized"]//h3[@class="code-header in-band"]' 'impl !Sized for Unsized'
Encountered 1 errors
------------------------------------------



---- [rustdoc] src/test/rustdoc/src-links-auto-impls.rs stdout ----

error: htmldocck failed!
status: exit status: 1
command: "/usr/bin/python3" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/src-links-auto-impls" "/checkout/src/test/rustdoc/src-links-auto-impls.rs"
stdout: none
--- stderr -------------------------------
4: @has check failed
 `XPATH PATTERN` did not match
 // @has - '//div[@id="impl-Sized-for-Unsized"]/h3[@class="code-header in-band"]' 'impl !Sized for Unsized'
6: @has check failed
 `XPATH PATTERN` did not match
 // @has - '//div[@id="impl-Sync-for-Unsized"]/h3[@class="code-header in-band"]' 'impl Sync for Unsized'
8: @has check failed
 `XPATH PATTERN` did not match
 // @has - '//div[@id="impl-Any-for-Unsized"]/h3[@class="code-header in-band"]' 'impl<T> Any for T'
9: @has check failed
 `XPATH PATTERN` did not match
 // @has - '//div[@id="impl-Any-for-Unsized"]//a[@class="srclink"]' 'source'
Encountered 4 errors
------------------------------------------


@JohnCSimon
Copy link
Member

triage:
@Dylan-DPC returning to you to address broken build

@rustbot author

@rustbot rustbot 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-review Status: Awaiting review from the assignee but also interested parties. labels Jul 3, 2022
@bors
Copy link
Collaborator

bors commented Jul 6, 2022

☔ The latest upstream changes (presumably #98987) made this pull request unmergeable. Please resolve the merge conflicts.

@Dylan-DPC
Copy link
Member Author

closing this as @GuillaumeGomez will be working on it and will be pulling from the same commit i pulled it from

@Dylan-DPC Dylan-DPC closed this Jul 7, 2022
@Dylan-DPC Dylan-DPC deleted the 92745/rustdoc-semantic-ids branch July 7, 2022 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

8 participants