Fix rustdoc ICE when checking if a generic arg can be elided - #160295
Merged
Conversation
Collaborator
|
rustbot has assigned @GuillaumeGomez. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Member
|
Please add a regression test. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
GuillaumeGomez
requested changes
Jul 31, 2026
Collaborator
|
Reminder, once the PR becomes ready for a review, use |
Contributor
Author
|
@rustbot ready |
fmease
reviewed
Aug 1, 2026
Member
There was a problem hiding this comment.
Smaller reproducer:
trait Trait<T = ()> {
type Type<'a, 'b>;
}
struct Struct<T: Trait<()>>(T::Type<'static, 'static>);
Contributor
Author
There was a problem hiding this comment.
When I test locally these do not ICE for me. Do you have the backtrace?
Contributor
Author
There was a problem hiding this comment.
I was able to minimize it to this. I haven't been successful on reproducing the ICE with a struct.
trait Trait<Default = ()> {
type Type<'a, 'b>;
}
type Type<T> = <T as Trait>::Type<'static, 'static>;
Contributor
Author
|
@rustbot ready |
GuillaumeGomez
approved these changes
Aug 3, 2026
Member
|
Thanks! @bors r+ rollup |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Aug 3, 2026
Fix rustdoc ICE when checking if a generic arg can be elided Fixes rust-lang#133637 The `param_at` call expects a index into the full generics list, while index is generated only from the children. I also noticed a call to `skip_norm_wip` so I replaced that with `skip_normalization` I have one question about adding the regression test, should it live under rustdoc-ui or rustdoc-ui/issue. I will add it later today. @fmease
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 3, 2026
…uwer Rollup of 21 pull requests Successful merges: - #159844 (Subtree cg_gcc sync (2026-07-24)) - #159326 (Deny multiple EII impls on a single item) - #159535 (Optimize slice::contains for bytewise types) - #159595 (Promote loongarch32-unknown-none* to Tier 2) - #160007 (allow `-Ldependency` search paths for panic runtimes) - #160320 (point at trait definition when it is used as a derive macro) - #160369 (When suggesting method names, prefer *exact* doc aliases over similar names) - #160406 (`DepKind` cleanups) - #160424 (Use `thread::available_parallelism` as the default limit for backend parallelism) - #159014 ([rustdoc] Do not take `doc(cfg())` into account when filtering doctests) - #159303 (Fix ICE for direct inline const generic defaults) - #159977 (Add regression test for bool indexing codegen) - #160165 (reject `...` without pattern post-expansion) - #160295 (Fix rustdoc ICE when checking if a generic arg can be elided) - #160305 (Linkify C-SKY targets in `platform-support.md`) - #160314 (fix borrowck ICE for consts with fn pointer type) - #160322 (ElaborateBoxDeref: remove unnecessary projection) - #160338 (Add regression test for supertrait associated type normalization through dyn) - #160340 (Add regression test for unused_parens on contract clauses) - #160371 (Add doc aliases for transpositions `read_exact_buf` and `read_exact_buf_at`) - #160384 (Add PR body notes for Cargo lock file maintenance)
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Aug 3, 2026
Fix rustdoc ICE when checking if a generic arg can be elided Fixes rust-lang#133637 The `param_at` call expects a index into the full generics list, while index is generated only from the children. I also noticed a call to `skip_norm_wip` so I replaced that with `skip_normalization` I have one question about adding the regression test, should it live under rustdoc-ui or rustdoc-ui/issue. I will add it later today. @fmease
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 3, 2026
…uwer Rollup of 23 pull requests Successful merges: - #153749 (Account for ownership mismatch on argument that doesn't meet bound) - #159326 (Deny multiple EII impls on a single item) - #159535 (Optimize slice::contains for bytewise types) - #159595 (Promote loongarch32-unknown-none* to Tier 2) - #160007 (allow `-Ldependency` search paths for panic runtimes) - #160184 (Add -Zinstrument-mcount={fentry-nop-record,fentry-record}) - #160320 (point at trait definition when it is used as a derive macro) - #160369 (When suggesting method names, prefer *exact* doc aliases over similar names) - #160406 (`DepKind` cleanups) - #160424 (Use `thread::available_parallelism` as the default limit for backend parallelism) - #159303 (Fix ICE for direct inline const generic defaults) - #159977 (Add regression test for bool indexing codegen) - #160011 (remove InterpError::map_err_info) - #160165 (reject `...` without pattern post-expansion) - #160295 (Fix rustdoc ICE when checking if a generic arg can be elided) - #160305 (Linkify C-SKY targets in `platform-support.md`) - #160314 (fix borrowck ICE for consts with fn pointer type) - #160322 (ElaborateBoxDeref: remove unnecessary projection) - #160338 (Add regression test for supertrait associated type normalization through dyn) - #160340 (Add regression test for unused_parens on contract clauses) - #160371 (Add doc aliases for transpositions `read_exact_buf` and `read_exact_buf_at`) - #160384 (Add PR body notes for Cargo lock file maintenance) - #160435 (bump tracing-tree)
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Aug 3, 2026
Fix rustdoc ICE when checking if a generic arg can be elided Fixes rust-lang#133637 The `param_at` call expects a index into the full generics list, while index is generated only from the children. I also noticed a call to `skip_norm_wip` so I replaced that with `skip_normalization` I have one question about adding the regression test, should it live under rustdoc-ui or rustdoc-ui/issue. I will add it later today. @fmease
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 4, 2026
…uwer Rollup of 26 pull requests Successful merges: - #153749 (Account for ownership mismatch on argument that doesn't meet bound) - #158727 (std: use `readdir` on nearly all UNIX platforms) - #159130 (a bit optimize four-digit chunks in integer formatting) - #159326 (Deny multiple EII impls on a single item) - #159535 (Optimize slice::contains for bytewise types) - #159595 (Promote loongarch32-unknown-none* to Tier 2) - #160184 (Add -Zinstrument-mcount={fentry-nop-record,fentry-record}) - #160320 (point at trait definition when it is used as a derive macro) - #160369 (When suggesting method names, prefer *exact* doc aliases over similar names) - #160406 (`DepKind` cleanups) - #160424 (Use `thread::available_parallelism` as the default limit for backend parallelism) - #159303 (Fix ICE for direct inline const generic defaults) - #159977 (Add regression test for bool indexing codegen) - #160011 (remove InterpError::map_err_info) - #160165 (reject `...` without pattern post-expansion) - #160295 (Fix rustdoc ICE when checking if a generic arg can be elided) - #160305 (Linkify C-SKY targets in `platform-support.md`) - #160314 (fix borrowck ICE for consts with fn pointer type) - #160322 (ElaborateBoxDeref: remove unnecessary projection) - #160338 (Add regression test for supertrait associated type normalization through dyn) - #160340 (Add regression test for unused_parens on contract clauses) - #160371 (Add doc aliases for transpositions `read_exact_buf` and `read_exact_buf_at`) - #160384 (Add PR body notes for Cargo lock file maintenance) - #160412 (Move duplicate-names check for #[rustc_must_implement_one_of] to attribute parser) - #160435 (bump tracing-tree) - #160449 (Fix lookup of object files)
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Aug 4, 2026
Fix rustdoc ICE when checking if a generic arg can be elided Fixes rust-lang#133637 The `param_at` call expects a index into the full generics list, while index is generated only from the children. I also noticed a call to `skip_norm_wip` so I replaced that with `skip_normalization` I have one question about adding the regression test, should it live under rustdoc-ui or rustdoc-ui/issue. I will add it later today. @fmease
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Aug 4, 2026
Fix rustdoc ICE when checking if a generic arg can be elided Fixes rust-lang#133637 The `param_at` call expects a index into the full generics list, while index is generated only from the children. I also noticed a call to `skip_norm_wip` so I replaced that with `skip_normalization` I have one question about adding the regression test, should it live under rustdoc-ui or rustdoc-ui/issue. I will add it later today. @fmease
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 4, 2026
Rollup of 28 pull requests Successful merges: - #153749 (Account for ownership mismatch on argument that doesn't meet bound) - #159130 (a bit optimize four-digit chunks in integer formatting) - #159326 (Deny multiple EII impls on a single item) - #159535 (Optimize slice::contains for bytewise types) - #159595 (Promote loongarch32-unknown-none* to Tier 2) - #160184 (Add -Zinstrument-mcount={fentry-nop-record,fentry-record}) - #160320 (point at trait definition when it is used as a derive macro) - #160369 (When suggesting method names, prefer *exact* doc aliases over similar names) - #160406 (`DepKind` cleanups) - #160424 (Use `thread::available_parallelism` as the default limit for backend parallelism) - #159303 (Fix ICE for direct inline const generic defaults) - #159977 (Add regression test for bool indexing codegen) - #160011 (remove InterpError::map_err_info) - #160165 (reject `...` without pattern post-expansion) - #160172 (tests: Enable `feature(stmt_expr_attributes)` in `2229_closure_analysis` tests) - #160295 (Fix rustdoc ICE when checking if a generic arg can be elided) - #160305 (Linkify C-SKY targets in `platform-support.md`) - #160314 (fix borrowck ICE for consts with fn pointer type) - #160322 (ElaborateBoxDeref: remove unnecessary projection) - #160338 (Add regression test for supertrait associated type normalization through dyn) - #160340 (Add regression test for unused_parens on contract clauses) - #160371 (Add doc aliases for transpositions `read_exact_buf` and `read_exact_buf_at`) - #160384 (Add PR body notes for Cargo lock file maintenance) - #160412 (Move duplicate-names check for #[rustc_must_implement_one_of] to attribute parser) - #160427 (Run try builds on EC2 by default) - #160435 (bump tracing-tree) - #160449 (Fix lookup of object files) - #160477 (Update the tracking issue for `borrowed_buf_init`)
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 4, 2026
Rollup of 28 pull requests Successful merges: - #153749 (Account for ownership mismatch on argument that doesn't meet bound) - #159130 (a bit optimize four-digit chunks in integer formatting) - #159326 (Deny multiple EII impls on a single item) - #159535 (Optimize slice::contains for bytewise types) - #159595 (Promote loongarch32-unknown-none* to Tier 2) - #160184 (Add -Zinstrument-mcount={fentry-nop-record,fentry-record}) - #160320 (point at trait definition when it is used as a derive macro) - #160369 (When suggesting method names, prefer *exact* doc aliases over similar names) - #160406 (`DepKind` cleanups) - #160424 (Use `thread::available_parallelism` as the default limit for backend parallelism) - #159303 (Fix ICE for direct inline const generic defaults) - #159977 (Add regression test for bool indexing codegen) - #160011 (remove InterpError::map_err_info) - #160165 (reject `...` without pattern post-expansion) - #160172 (tests: Enable `feature(stmt_expr_attributes)` in `2229_closure_analysis` tests) - #160295 (Fix rustdoc ICE when checking if a generic arg can be elided) - #160305 (Linkify C-SKY targets in `platform-support.md`) - #160314 (fix borrowck ICE for consts with fn pointer type) - #160322 (ElaborateBoxDeref: remove unnecessary projection) - #160338 (Add regression test for supertrait associated type normalization through dyn) - #160340 (Add regression test for unused_parens on contract clauses) - #160371 (Add doc aliases for transpositions `read_exact_buf` and `read_exact_buf_at`) - #160384 (Add PR body notes for Cargo lock file maintenance) - #160412 (Move duplicate-names check for #[rustc_must_implement_one_of] to attribute parser) - #160427 (Run try builds on EC2 by default) - #160435 (bump tracing-tree) - #160449 (Fix lookup of object files) - #160477 (Update the tracking issue for `borrowed_buf_init`)
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 4, 2026
Rollup of 28 pull requests Successful merges: - #153749 (Account for ownership mismatch on argument that doesn't meet bound) - #159130 (a bit optimize four-digit chunks in integer formatting) - #159326 (Deny multiple EII impls on a single item) - #159535 (Optimize slice::contains for bytewise types) - #159595 (Promote loongarch32-unknown-none* to Tier 2) - #160184 (Add -Zinstrument-mcount={fentry-nop-record,fentry-record}) - #160320 (point at trait definition when it is used as a derive macro) - #160369 (When suggesting method names, prefer *exact* doc aliases over similar names) - #160406 (`DepKind` cleanups) - #160424 (Use `thread::available_parallelism` as the default limit for backend parallelism) - #159303 (Fix ICE for direct inline const generic defaults) - #159977 (Add regression test for bool indexing codegen) - #160011 (remove InterpError::map_err_info) - #160165 (reject `...` without pattern post-expansion) - #160172 (tests: Enable `feature(stmt_expr_attributes)` in `2229_closure_analysis` tests) - #160295 (Fix rustdoc ICE when checking if a generic arg can be elided) - #160305 (Linkify C-SKY targets in `platform-support.md`) - #160314 (fix borrowck ICE for consts with fn pointer type) - #160322 (ElaborateBoxDeref: remove unnecessary projection) - #160338 (Add regression test for supertrait associated type normalization through dyn) - #160340 (Add regression test for unused_parens on contract clauses) - #160371 (Add doc aliases for transpositions `read_exact_buf` and `read_exact_buf_at`) - #160384 (Add PR body notes for Cargo lock file maintenance) - #160412 (Move duplicate-names check for #[rustc_must_implement_one_of] to attribute parser) - #160427 (Run try builds on EC2 by default) - #160435 (bump tracing-tree) - #160449 (Fix lookup of object files) - #160477 (Update the tracking issue for `borrowed_buf_init`)
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 4, 2026
Rollup of 29 pull requests Successful merges: - #153749 (Account for ownership mismatch on argument that doesn't meet bound) - #159130 (a bit optimize four-digit chunks in integer formatting) - #159326 (Deny multiple EII impls on a single item) - #159535 (Optimize slice::contains for bytewise types) - #159595 (Promote loongarch32-unknown-none* to Tier 2) - #160184 (Add -Zinstrument-mcount={fentry-nop-record,fentry-record}) - #160320 (point at trait definition when it is used as a derive macro) - #160369 (When suggesting method names, prefer *exact* doc aliases over similar names) - #160406 (`DepKind` cleanups) - #160424 (Use `thread::available_parallelism` as the default limit for backend parallelism) - #160434 (Avoid Docker push when the image did not change) - #159303 (Fix ICE for direct inline const generic defaults) - #159977 (Add regression test for bool indexing codegen) - #160011 (remove InterpError::map_err_info) - #160165 (reject `...` without pattern post-expansion) - #160172 (tests: Enable `feature(stmt_expr_attributes)` in `2229_closure_analysis` tests) - #160295 (Fix rustdoc ICE when checking if a generic arg can be elided) - #160305 (Linkify C-SKY targets in `platform-support.md`) - #160314 (fix borrowck ICE for consts with fn pointer type) - #160322 (ElaborateBoxDeref: remove unnecessary projection) - #160338 (Add regression test for supertrait associated type normalization through dyn) - #160340 (Add regression test for unused_parens on contract clauses) - #160371 (Add doc aliases for transpositions `read_exact_buf` and `read_exact_buf_at`) - #160384 (Add PR body notes for Cargo lock file maintenance) - #160412 (Move duplicate-names check for #[rustc_must_implement_one_of] to attribute parser) - #160427 (Run try builds on EC2 by default) - #160435 (bump tracing-tree) - #160449 (Fix lookup of object files) - #160477 (Update the tracking issue for `borrowed_buf_init`)
rust-timer
added a commit
that referenced
this pull request
Aug 4, 2026
Rollup merge of #160295 - Colepng:main, r=GuillaumeGomez Fix rustdoc ICE when checking if a generic arg can be elided Fixes #133637 The `param_at` call expects a index into the full generics list, while index is generated only from the children. I also noticed a call to `skip_norm_wip` so I replaced that with `skip_normalization` I have one question about adding the regression test, should it live under rustdoc-ui or rustdoc-ui/issue. I will add it later today. @fmease
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.
View all comments
Fixes #133637
The
param_atcall expects a index into the full generics list, while index is generated only from the children.I also noticed a call to
skip_norm_wipso I replaced that withskip_normalizationI have one question about adding the regression test, should it live under rustdoc-ui or rustdoc-ui/issue. I will add it later today.
@fmease