Skip to content

GenericArg::Infer may be unreachable in rustdoc-types #140679

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
fluiderson opened this issue May 5, 2025 · 0 comments
Open

GenericArg::Infer may be unreachable in rustdoc-types #140679

fluiderson opened this issue May 5, 2025 · 0 comments
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@fluiderson
Copy link

GenericArg::Infer was introduced in #83484 as a part of #85077. AFAICT, as rustdoc-types are converted from HIR, this variant was propagated to rustdoc-types. It was even documented later in #127290. But is it possible to obtain?

GenericArg is a part of GenericArgs that is a part of AssocItemConstraint, Path, and Type::QualifiedPath. Attempts to use the _ placeholder for any of them fail with the same error E0121. I've also tried to get this variant by generating JSON docs of a few huge crates, but to no avail. I guess it's impossible to use the placeholder in any position inside any item's signature. The only place it's allowed is in statements/expressions that're not represented in rustdoc-types.

I think if there's no intention to allow the placeholder inside item signatures, this variant should be removed from rustdoc-types.

The same also may be applicable to Type::Infer, but I didn't checked it as it's not important for my use case.

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label May 5, 2025
@jieyouxu jieyouxu added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-bug Category: This is a bug. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants