Skip to content
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

rustdoc incorrectly prints APIT in AliasTy::new #138604

Open
lcnr opened this issue Mar 17, 2025 · 1 comment
Open

rustdoc incorrectly prints APIT in AliasTy::new #138604

lcnr opened this issue Mar 17, 2025 · 1 comment
Assignees
Labels
A-cross-crate-reexports Area: Documentation that has been re-exported from a different crate C-bug Category: This is a bug. F-associated_type_bounds `#![feature(associated_type_bounds)]` S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@lcnr
Copy link
Contributor

lcnr commented Mar 17, 2025

https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/type.AliasTy.html#method.new

currently prints the method signature as

pub fn new(
    interner: I,
    def_id: <I as Interner>::DefId,
    args: impl IntoIterator>,
) -> AliasTy<I>
where
    <impl IntoIterator as IntoIterator>::Item: Into<<I as Interner>::GenericArg>,

I cannot reproduce this outside of the nightly compiler docs.

Image

@lcnr lcnr added E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Mar 17, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 17, 2025
@lcnr lcnr changed the title rustdoc incorrectly prints APITs in AliasTy::new rustdoc incorrectly prints APIT in AliasTy::new Mar 17, 2025
@fmease fmease self-assigned this Mar 17, 2025
@fmease fmease added C-bug Category: This is a bug. A-cross-crate-reexports Area: Documentation that has been re-exported from a different crate labels Mar 17, 2025
@fmease
Copy link
Member

fmease commented Mar 17, 2025

Issue with inlined cross-crate re-exports (middle::ty cleaning as opposed to HIR cleaning). IXCRE ATBs haven't been impl'ed yet (cc #126432). Example MCVE:

a.rs (rustc --crate-type lib):

pub fn f(_: impl Iterator<Item: Copy>) {}

b.rs (rustdoc b.rs --edition 2018 -L. --extern a):

pub use a::*;

Rendered:

pub fn f(_: impl Iterator)
where
    <impl Iterator as Iterator>::Item: Copy,

@fmease fmease added S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue F-associated_type_bounds `#![feature(associated_type_bounds)]` and removed E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cross-crate-reexports Area: Documentation that has been re-exported from a different crate C-bug Category: This is a bug. F-associated_type_bounds `#![feature(associated_type_bounds)]` S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue 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