-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Point "deref coercions" links to new book #43631
Conversation
It does generate tidy errors:
Is there anything that can be done about that? |
@ruuda thanks for the PR! We'll check in now and again to make sure @steveklabnik or another reviewer gets to it soon. There are allowances made for URLs ( |
src/libstd/lib.rs
Outdated
//! calls to methods on [`str`] and [`[T]`][slice] respectively, via [deref | ||
//! coercions]. | ||
//! calls to methods on [`str`] and [`[T]`][slice] respectively, via | ||
//! [deref-coercions]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change? (Hyphen is added to the link text.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added it because the tidy check does not deal with spaces in named links, not realising that it was the short form. Fixed.
This is waiting for #43632 |
…ark-Simulacrum Detect relative urls in tidy check This came up in rust-lang#43631: there can be long relative urls in Markdown comments, that do not start with `http://` or `https://`, so the tidy check will not detect them as urls and complain about the line length. This PR adds detection of relative urls starting with `../`.
…ark-Simulacrum Detect relative urls in tidy check This came up in rust-lang#43631: there can be long relative urls in Markdown comments, that do not start with `http://` or `https://`, so the tidy check will not detect them as urls and complain about the line length. This PR adds detection of relative urls starting with `../`.
@arielb1: Rebased, this now passes the tidy check. |
☔ The latest upstream changes (presumably #43724) made this pull request unmergeable. Please resolve the merge conflicts. |
Currently the link on doc.rust-lang.org is semi-broken; it links to a page that links to the exact page in the first edition in the book, or to the index of the second edition of the book. If the second editions is the recommended one now, we should point the links at that one. It seems that in the mean time, the links have been updated to point directly to the first edition of the book, but that hasn't made it onto the stable channel yet. By the time this commit makes it onto the stable channel, the second edition of the book should be complete enough. At least the part about deref coercions is.
With the space, the tidy check does not recognize it as a link label. See also the comment above in line_is_url() in src/tools/tidy/src/style.rs.
The text does not need the hyphen, but the anchor name does.
Hi @steveklabnik - I think this is ready for review. |
@bors r+ rollup Thanks! (oops, i misspelled the bot's name in my last one |
📌 Commit e63d979 has been approved by |
Point "deref coercions" links to new book Currently the link on doc.rust-lang.org is semi-broken; it links to a page that links to the exact page in the first edition in the book, or to the index of the second edition of the book. If the second editions is the recommended one now, we should point the links at that one. (In the mean time, the links have been updated to point directly to the first edition of the book, but that hasn't made it onto the stable channel yet.) By the time this commit makes it onto the stable channel, the second edition of the book should be complete enough. At least the part about deref coercions is. r? @steveklabnik
Currently the link on doc.rust-lang.org is semi-broken; it links to a page that links to the exact page in the first edition in the book, or to the index of the second edition of the book. If the second editions
is the recommended one now, we should point the links at that one. (In the mean time, the links have been updated to point directly to the first edition of the book, but that hasn't made it onto
the stable channel yet.) By the time this commit makes it onto the stable channel, the second edition of the book should be complete enough. At least the part about deref coercions is.
r? @steveklabnik