-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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: remove the !
from macro URLs and titles
#35234
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
Sounds good to me! @steveklabnik what do you think? |
I don't think we can change the URLs because it will break links. We could change the titles but it brings up an interesting point about how we refer to macros. For instance on the page for |
I don't mind breaking a few links, I don't think it will be a huge impact. I'd be fine with adding redirects, but with no warnings, that is just pushing the breakage down the road, unless we want to leave the redirects forever (which I guess is not too bad). |
I like the idea, but also share concern about breaking things. Across all these PRs, I have no idea what the "right" thing is; at some point, we will have to break stuff. It'd be kinda nice to do it all at once, though... |
See also rust-lang/rfcs#1561, which has a bunch of discussion in the comment thread about whether |
@steveklabnik this is my only PR with a breaking change in it at the moment, I don't have anything else planned and I think the bustage here will be pretty minor. I do think we should be willing to eat some breakage in Rustdoc - the implementation needs some serious work and unfortunately what should be implementation details is exposed in public interfaces such as URLs, if we're forever shy of breaking, we'll be stuck with the current implementation. Agree it's good to have a strategy to minimise pain. |
Well if you do change the URLs, for this to pass linkchecker you'll need to add redirects and/or update all the manual links in the docs. |
Gonna add this to the doc team meeting agenda for this week |
@steveklabnik let me know what you come up with - I can update the links in the docs, but not worth doing unless you'll take the patch |
@nrc We talked at the doc team, and we're 👍 on merging this patch. Please do! |
@bors: r+ b55a28317fcb1c5e175d2b1dcba1b6088a808231 May as well help to see the errors from the linkchecker! |
⌛ Testing commit b55a283 with merge 7097fe5... |
💔 Test failed - auto-win-gnu-32-opt-rustbuild |
This will break any links to macros in user-crate documentation. |
Crater does not. Rustdoc does not. There is a linkchecker tool which does. This will be a breaking change for docs. |
We don't have to break anything if we just add redirects. IMO if we change URLs then we have to add redirects. |
Yes, we want to make sure the redirects are here. |
Now with links fixed and redirects added (no longer a breaking change). |
Maybe add a test to make sure the redirects are generated correctly? |
now with bonus test |
☔ The latest upstream changes (presumably #35236) made this pull request unmergeable. Please resolve the merge conflicts. |
rebased |
ping @steveklabnik r? |
@bor: r+ rollup |
@steveklabnik looks like you misspelt @bors |
@bors: r=steveklabnik rollup |
📌 Commit 301401e has been approved by |
rustdoc: remove the `!` from macro URLs and titles Because the `!` is part of a macro use, not the macro's name. E.g., you write `macro_rules! foo` not `macro_rules! foo!`, also `#[macro_import(foo)]`. (Pulled out of rust-lang#35020).
rustdoc: remove the `!` from macro URLs and titles Because the `!` is part of a macro use, not the macro's name. E.g., you write `macro_rules! foo` not `macro_rules! foo!`, also `#[macro_import(foo)]`. (Pulled out of rust-lang#35020).
Because the
!
is part of a macro use, not the macro's name. E.g., you writemacro_rules! foo
notmacro_rules! foo!
, also#[macro_import(foo)]
.(Pulled out of #35020).