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: Links to trait aliases go to trait.Foo.html but the pages are traitalias.Foo.html #84782

Closed
scottmcm opened this issue May 1, 2021 · 1 comment · Fixed by #84811
Closed
Assignees
Labels
C-bug Category: This is a bug. F-trait_alias `#![feature(trait_alias)]` T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@scottmcm
Copy link
Member

scottmcm commented May 1, 2021

Found as part of my change in #84767.

CI build failure: https://github.com/rust-lang/rust/pull/84767/checks?check_run_id=2480989637#step:24:3504

std/iter/struct.Peekable.html:177: broken link - core/ops/trait.TryWhereOutputEquals.html
std/iter/struct.Once.html:13: broken link - core/ops/trait.TryWhereOutputEquals.html
std/iter/struct.Rev.html:14: broken link - core/ops/trait.TryWhereOutputEquals.html
...

Checking locally, the generated file is

/rust/build/x86_64-pc-windows-msvc/doc/core/ops/traitalias.TryWhereOutputEquals.html

Trait, as well as its uses, are in ee4aa51#diff-b5736412f785f181ff3fcd768a2ea5f3bc1c6313af38a0094e5ef49c0e489c4fR223

@scottmcm scottmcm added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-bug Category: This is a bug. F-trait_alias `#![feature(trait_alias)]` labels May 1, 2021
@scottmcm scottmcm self-assigned this May 1, 2021
@scottmcm
Copy link
Member Author

scottmcm commented May 1, 2021

Oh, curious, this has different behaviour in core and std.

In core (the crate where it's defined) it doesn't link the trait alias at all:
image

Whereas in std it generates a link, but to the wrong place:
image

@bors bors closed this as completed in 37ce332 May 3, 2021
bors added a commit to rust-lang-ci/rust that referenced this issue May 18, 2021
Implement the new desugaring from `try_trait_v2`

~~Currently blocked on rust-lang#84782, which has a PR in rust-lang#84811 Rebased atop that fix.

`try_trait_v2` tracking issue: rust-lang#84277

Unfortunately this is already touching a ton of things, so if you have suggestions for good ways to split it up, I'd be happy to hear them.  (The combination between the use in the library, the compiler changes, the corresponding diagnostic differences, even MIR tests mean that I don't really have a great plan for it other than trying to have decently-readable commits.

r? `@ghost`

~~(This probably shouldn't go in during the last week before the fork anyway.)~~ Fork happened.
flip1995 pushed a commit to flip1995/rust-clippy that referenced this issue May 20, 2021
Implement the new desugaring from `try_trait_v2`

~~Currently blocked on rust-lang/rust#84782, which has a PR in rust-lang/rust#84811 Rebased atop that fix.

`try_trait_v2` tracking issue: rust-lang/rust#84277

Unfortunately this is already touching a ton of things, so if you have suggestions for good ways to split it up, I'd be happy to hear them.  (The combination between the use in the library, the compiler changes, the corresponding diagnostic differences, even MIR tests mean that I don't really have a great plan for it other than trying to have decently-readable commits.

r? `@ghost`

~~(This probably shouldn't go in during the last week before the fork anyway.)~~ Fork happened.
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. F-trait_alias `#![feature(trait_alias)]` T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant