Fix generic impl rustdoc json output#98053
Conversation
This comment has been minimized.
This comment has been minimized.
b088a41 to
99cd9ca
Compare
|
And fixed fmt... |
|
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). |
|
I have the three other issues open. I will go through them after this one is merged. |
|
Oh right, I forgot @CraftSpider was away for the moment. I'll set another reviewer. r? @notriddle |
|
@bors r+ rollup |
|
📌 Commit 99cd9ca has been approved by |
…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`
…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``
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
…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
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