rust/tests/rustdoc/reexport
Samuel Tardieu 4eddebd42b
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``````
2025-08-02 11:24:21 +02:00
..
auxiliary fix regression test 2025-07-22 17:11:48 -05:00
alias-reexport.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
alias-reexport2.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
anonymous-reexport-108931.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
anonymous-reexport.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
blanket-reexport-item.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
cfg_doc_reexport.rs rustdoc: {Meta,Pointee,}Sized in non-minicore 2025-06-16 23:04:36 +00:00
doc-hidden-reexports-109449.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
doc_auto_cfg-reexport-foreign-113982.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
duplicated-glob-reexport-60522.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
enum-variant-reexport-35488.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
extern-135092.rs rustdoc: add regression test for issue 135092 2025-06-27 11:49:12 -05:00
foreigntype-reexport.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
glob-reexport-attribute-merge-120487.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
glob-reexport-attribute-merge-doc-auto-cfg.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
ice-reexport-crate-root-28927.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
local-reexport-doc.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
merge-glob-and-non-glob.rs Add regression test for #143107 2025-07-10 11:41:50 +02:00
no-compiler-reexport.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
overlapping-reexport-105735-2.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
overlapping-reexport-105735.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
primitive-reexport.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
pub-reexport-of-pub-reexport-46506.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
reexport-attr-merge.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
reexport-attrs.rs [rustdoc] Display unsafe attrs with edition 2024 unsafe() wrappers. 2025-07-23 00:00:01 +00:00
reexport-cfg.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
reexport-check.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
reexport-dep-foreign-fn.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
reexport-doc-hidden-inside-private.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
reexport-doc-hidden.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
reexport-doc.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
reexport-hidden-macro.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
reexport-macro.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
reexport-of-doc-hidden.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
reexport-of-reexport-108679.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
reexport-stability-tags-deprecated-and-portability.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
reexport-stability-tags-unstable-and-portability.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
reexport-trait-from-hidden-111064-2.rs rustdoc: {Meta,Pointee,}Sized in non-minicore 2025-06-16 23:04:36 +00:00
reexport-trait-from-hidden-111064.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
reexports-of-same-name.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
reexports-priv.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
reexports.rs Created tests/rustdoc/reexports subfolder to limit number of files at the top level 2025-05-05 17:47:17 +02:00
wrapped-unnamble-type-143222.rs fix regression test 2025-07-22 17:11:48 -05:00