Skip to content

Commit 86cdc33

Browse files
Rollup merge of #143662 - obi1kenobi:pg/unsafe-attribute-wrappers, r=t-rustdoc
[rustdoc] Display unsafe attrs with edition 2024 `unsafe()` wrappers. Use Rust 2024 edition representation for unsafe attributes in rustdoc 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``````
2 parents c7c5daf + 3914c53 commit 86cdc33

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)