SIGN IN SIGN UP
rust-lang / rust UNCLAIMED

Empowering everyone to build reliable and efficient software.

0 0 65 Rust

Rollup merge of #154902 - shivendra02467:fix-rustdoc-macro-inline, r=lolbinarycat

rustdoc: Inherit inline attributes for declarative macros

When explicitly re-exporting a declarative macro by name, rustdoc previously bypassed intermediate re-exports and dropped `#[doc(inline)]` attributes, causing the macro to be incorrectly stripped if the original definition was `#[doc(hidden)]`.

This updates `generate_item_with_correct_attrs` to walk the `reexport_chain` specifically for declarative macros, allowing them to inherit inline attributes exactly as glob imports do, while preserving strict visibility rules for standard items.

Fixes rust-lang/rust#154694
J
Jacob Pratt committed
084a82eec748f9391c94cc2f8f9fdc8e8d88f15d
Committed by GitHub <noreply@github.com> on 4/8/2026, 3:05:32 AM