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

Warn on using intra-doc links on stable #63305

Closed
abonander opened this issue Aug 5, 2019 · 3 comments
Closed

Warn on using intra-doc links on stable #63305

abonander opened this issue Aug 5, 2019 · 3 comments
Labels
A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name A-stability Area: `#[stable]`, `#[unstable]` etc. C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@abonander
Copy link
Contributor

It would be a significant effort to implement feature-gates in Rustdoc just for intra-doc links so I understand why that hasn't been done.

However, because there is no warning I've been unintentionally creating docs with broken links on stable for a while now. I haven't observed this myself because I prefer nightly compilers and assume it works on stable if there's no feature flags, and docs.rs uses a nightly compiler as well so published docs work fine. It should be relatively easy to produce this warning on stable as most of the same logic already exists to tell the difference between a real URL and an item path: https://github.com/rust-lang/rust/blob/master/src/librustdoc/passes/collect_intra_doc_links.rs#L277

This has caught at least one other user by surprise as well: https://www.reddit.com/r/rust/comments/cm7rhv/hey_rustaceans_got_an_easy_question_ask_here/ew0nvo2/?context=1000

@abonander
Copy link
Contributor Author

cc #43466, @steveklabnik

@jonas-schievink jonas-schievink added A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Aug 5, 2019
@jyn514
Copy link
Member

jyn514 commented Aug 19, 2020

I'm sympathetic to the issue, but because intra-doc links are so close to stabilizing, I think it makes sense to let this be solved 'naturally' by having them work on stable too :) Especially since any fix would be part of rustdoc, so you'd only see it after the fix itself rode the release train for 12 weeks.

I'll leave this open until intra-doc links are finally stable, though (watch #74430 for details).

@jyn514 jyn514 added the A-stability Area: `#[stable]`, `#[unstable]` etc. label Aug 25, 2020
@jyn514
Copy link
Member

jyn514 commented Sep 28, 2020

Closing this since intra-doc links will be stable in 1.48 and it will be a moot point: #74430

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name A-stability Area: `#[stable]`, `#[unstable]` etc. C-enhancement Category: An issue proposing an enhancement or a PR with one. 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