-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[rustdoc] Display unsafe attrs with edition 2024 unsafe()
wrappers.
#143662
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
base: master
Are you sure you want to change the base?
[rustdoc] Display unsafe attrs with edition 2024 unsafe()
wrappers.
#143662
Conversation
|
rustdoc-json-types is a public (although nightly-only) API. If possible, consider changing cc @CraftSpider, @aDotInTheVoid, @Enselic, @obi1kenobi These commits modify Please ensure that if you've changed the output:
|
Not an issue, thanks for the heads-up. |
@rfcbot fcp cancel |
@aDotInTheVoid proposal cancelled. |
@rfcbot fcp merge (accidentally FCP’d to full T-Rustdoc, not T-Rustdoc-Frontend 💀) |
@rust-lang/rustdoc-frontend can someone start an FCP on this? |
Sounds like a good idea! @aDotInTheVoid normally with only the EDIT: Ah no, just learned that you need o be part of the (sub-)team to do that, my bad. @rfcbot fcp merge |
Team member @GuillaumeGomez has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
Use Rust 2024 edition representation for unsafe attributes in rustdoc JSON and HTML:
#[no_mangle]
->#[unsafe(no_mangle)]
#[export_name = "foo"]
->#[unsafe(export_name = "foo")]
#[link_section = ".text"]
->#[unsafe(link_section = ".text")]
The 2024 edition representation is used regardless of the crate's own edition. This ensures that Rustaceans don't have to learn the rules of an outdated edition (e.g. that
unsafe()
wasn't always necessary) in order to understand a crate's documentation.After some looking through the
T-rustdoc
issues, I was not able to find an existing issue for this. Apologies if I missed it.r? @aDotInTheVoid