Fix ICE in rustdoc when merging generic and where bounds of an Fn with an output#63937
Fix ICE in rustdoc when merging generic and where bounds of an Fn with an output#63937bors merged 3 commits intorust-lang:masterfrom
Conversation
…of an Fn with an output Fixes rust-lang#57180
|
|
| params | ||
| } | ||
|
|
||
| fn ty_bounds(bounds: Vec<clean::GenericBound>) -> Vec<clean::GenericBound> { |
There was a problem hiding this comment.
This seemed like pointless noise, so I removed it. If this was setup for future work, let me know so I can add a comment explaining that for future readers 😃
| } | ||
| } | ||
|
|
||
| // Simplify the type parameter bounds on all the generics |
There was a problem hiding this comment.
Since ty_bounds was a nop, just a pass-through, this transform seemed to just be added noise and should be safe to remove.
|
I was also able to determine that this bug was introduced somewhere between 1.30 and 1.31. The compiler processes the code just fine in 1.30, but ICE's in 1.31. |
| impl<F: Fn() -> u32> | ||
| Trait for Struct<F> | ||
| where | ||
| F: Fn() -> u32, |
There was a problem hiding this comment.
Should I run format on this? Also, does this test need a comment saying it's a regression test, or is its existence enough?
There was a problem hiding this comment.
Existence alone is fine.
|
Ping from triage |
|
Ping from triage |
|
I was doing some analysis on the originating cause (documented in #57180). I mostly believe this is still the proper fix, but I was hoping someone familiar with this codebase could review and help bump up the confidence here. I requested @QuietMisdreavus for review since she was helping me track down the bug during impl days. |
|
Ping from triage: requesting a review from @rust-lang/rustdoc |
|
Since the real change is only one line, pretty quick to review. The regression test is also present so all good. Don't hesitate to ping me or @rust-lang/rustdoc directly next time. Thanks! @bors: r+ |
|
📌 Commit 143b83a has been approved by |
…meGomez Fix ICE in rustdoc when merging generic and where bounds of an Fn with an output Fixes rust-lang#57180
Fix ICE in rustdoc when merging generic and where bounds of an Fn with an output Fixes #57180
|
☀️ Test successful - checks-azure |
Fixes #57180