-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Broken links in String
documentation from Deref
impl
#32129
Comments
It would be most awesome if there were some way to link to an item in Rustdoc, not just putting in a link URL, but that's perhaps out of scope for now. Maybe just some basic variable substitution, so you could write |
Yeah I suspect some basic substitution could work especially because we control the markdown rendering. I'd be a little wary to add API surface area to rustdoc, but it seems minorly well motivated? |
It seems pretty much required to put in some facility for linking without relative URLs, because Deref copies and pastes things around. |
It would be nice if we could follow the work CommonMark is doing here, so we're not totally just inventing a new thing. http://talk.commonmark.org/t/generic-directives-plugins-syntax/444 seems to be at least one relevant discussion. |
That seems like a nice long-term solution, that'd have to be implemented in hoedown however. There is an old issue regarding this on their repo: hoedown/hoedown#99 |
yes, I would like to move from hoedown to pulldown-cmark, personally. |
Opened an issue for moving to pulldown-cmark: #38400 |
This issue seems to block the testing of compiler docs: ref #46278 |
Add compiler docs testing to CI. Fixes #47025. I don't know if `x86_64-gnu` is the right builder for this, but there seems to be time left on [Travis](https://travis-ci.org/rust-lang/rust/jobs/307488864). Remaining problems blocking this PR: - [x] broken links caused by rustdoc issues: - [x] `pub use self::Enum::...`: #46766 and #46767 (fixed by #47050, thanks @ollie27!) - [x] `impl Deref for DerefToStdType`: #32129 (ignored in linkchecker) - [x] `#[feature(decl_macro)]` and `use std::vec`: #47038 (ignored in linkchecker) - [x] `rustc_data_structures::sync::{Lrc, RwLock}` aliases `std` types: #32130 (ignored in linkchecker) - [x] markdown differences, in rust repository and in external crates, now failing the build with #46880 merged (all fixed) - [x] multiple crate updates needed: `rand`, `log`, `parking_lot_core`, `flate2` - [x] submodule updates needed to deduplicate dependencies: `rust-installer`, ~`cargo`~ (done by #47052) - [x] #44953 test broken by `log` update (removed, this can be controversial) - [x] Waiting `x86_64-gnu` build results ([done](https://travis-ci.org/rust-lang/rust/builds/323451069)) See individual commits for more details.
fixed broken links to char fixes rust-lang#32129
This needs to be reopened. There are still broken links (e.g. #55666) and this issue can't be closed until the whitelist in linkchecker is removed: rust/src/tools/linkchecker/main.rs Lines 134 to 148 in 8315b11
|
This is fixed, closing it. Thanks :) |
@Dylan-DPC I don't think it was (unless the nightly docs haven't been updated with the fix yet). In the |
It might be useful to have a tracking issue for all of the causes of broken links (maybe reuse this one?), because there are dozens of broken links, and I think some are for different reasons. It'd be nice to have a goal to remove the linkchecker whitelist. I'd guess most of them are waiting for intra-rustdoc-links to handle all the appropriate scenarios? It's not really clear what needs to be done. |
Use intra-doc links in `str` and `BTreeSet` Fixes rust-lang#32129, fixes rust-lang#32130 A _slight_ degradation in quality is that the `#method.foo` links would previously link to the same page on `String`'s documentation, and now they will navigate to `str`. Not a big deal IMO, and we can also try to improve that.
Use intra-doc links in `str` and `BTreeSet` Fixes rust-lang#32129, fixes rust-lang#32130 A _slight_ degradation in quality is that the `#method.foo` links would previously link to the same page on `String`'s documentation, and now they will navigate to `str`. Not a big deal IMO, and we can also try to improve that.
Reopening until the exclusions in the link checker can be removed. |
More intra-doc links, add explicit exception list to linkchecker Fixes the broken links behind rust-lang#32553 Progress on rust-lang#32130 and rust-lang#32129 except for a small number of links. Instead of whitelisting entire files, I've changed the code to whitelist specific links in specific files, and added a comment requesting people explain the reasons they add exceptions. I'm not sure if we should close those issues in favor of the already filed intra-doc link issues.
I think this was fixed in #74485? Should this be closed? |
Considering that all the String links seem to be fixed, I think it is good to close. It looks like there are plenty of other tracking issues for the last remaining broken links (like #63351 and #74481), so I think those are adequately tracked. Thanks everyone for putting all the work into intra-doc-links! |
There are a bunch of links in the
String
documentation page which are broken. The reason for this is that most links are drawn from the documentation of thestr
type at/std/primitive.str.html
but theString
page is located at/std/string/struct.String.html
. This mismatch in depth of paths causes a number of broken links, for example on theString::split
method.Not sure of the best way to fix this, but needs a tracking issue.
The text was updated successfully, but these errors were encountered: