Fix generic impl rustdoc json output#98053
Merged
bors merged 2 commits intorust-lang:masterfrom Jun 16, 2022
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
b088a41 to
99cd9ca
Compare
Member
Author
|
And fixed fmt... |
Member
|
Thanks a lot for this fix. I can confirm that this makes it possible to build rustdoc JSON for https://github.com/serde-rs/serde/tree/master/serde. It used to result in an ICE. There is still an ICE for https://github.com/diesel-rs/diesel/tree/b5c2e26d4d9f464458430427704fc50de985c632/diesel though. Just wanted to mention it in case you want to take care of that while you're at it. It is also triggered by a blanket impl, see analysis in #93588 (comment) and #93588 (comment). |
Member
Author
|
I have the three other issues open. I will go through them after this one is merged. |
Member
Author
|
Oh right, I forgot @CraftSpider was away for the moment. I'll set another reviewer. r? @notriddle |
Contributor
|
@bors r+ rollup |
Collaborator
|
📌 Commit 99cd9ca has been approved by |
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
Jun 15, 2022
…n-ice, r=notriddle Fix generic impl rustdoc json output Fixes rust-lang#97986. The problem in case of generic trait impl is that the trait's items are the same for all the types afterward. But since they're the same, it's safe for rustdoc-json to just ignore them. A little representation of what's going on: ```rust trait T { fn f(); // <- defid 0 } impl<Y> T for Y { fn f() {} // <- defid 1 } struct S; // <- defid 1 (since it matches `impl<Y> T for Y` ``` cc `@Urgau` r? `@CraftSpider`
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
Jun 15, 2022
…n-ice, r=notriddle Fix generic impl rustdoc json output Fixes rust-lang#97986. The problem in case of generic trait impl is that the trait's items are the same for all the types afterward. But since they're the same, it's safe for rustdoc-json to just ignore them. A little representation of what's going on: ```rust trait T { fn f(); // <- defid 0 } impl<Y> T for Y { fn f() {} // <- defid 1 } struct S; // <- defid 1 (since it matches `impl<Y> T for Y` ``` cc ``@Urgau`` r? ``@CraftSpider``
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 15, 2022
Rollup of 7 pull requests Successful merges: - rust-lang#97202 (os str capacity documentation) - rust-lang#97964 (Fix suggestions for `&a: T` parameters) - rust-lang#98053 (Fix generic impl rustdoc json output) - rust-lang#98059 (Inline `const_eval_select`) - rust-lang#98092 (Fix sidebar items expand collapse) - rust-lang#98119 (Refactor path segment parameter error) - rust-lang#98135 (Add regression test for rust-lang#93775) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Jun 28, 2022
…doc-json, r=GuillaumeGomez rustdoc-json: Allow Typedef to be different in sanity assert Closes rust-lang#98547 This fix is a natural extension of rust-lang#98053. r? `@notriddle` (Since you reviewed the other PR.) CC `@GuillaumeGomez` `@rustbot` labels +A-rustdoc-json +T-rustdoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #97986.
The problem in case of generic trait impl is that the trait's items are the same for all the types afterward. But since they're the same, it's safe for rustdoc-json to just ignore them.
A little representation of what's going on:
cc @Urgau
r? @CraftSpider