mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Fix rustdoc not correctly showing attributes with re-exports
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
This commit is contained in:
@@ -2746,7 +2746,8 @@ fn add_without_unwanted_attributes<'hir>(
|
||||
attrs.push((Cow::Owned(attr), import_parent));
|
||||
}
|
||||
}
|
||||
hir::Attribute::Parsed(..) if is_inline => {
|
||||
// FIXME: make sure to exclude `#[cfg_trace]` here when it is ported to the new parsers
|
||||
hir::Attribute::Parsed(..) => {
|
||||
attrs.push((Cow::Owned(attr), import_parent));
|
||||
}
|
||||
_ => {}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
// Tests that attributes are correctly copied onto a re-exported item.
|
||||
//@ edition:2021
|
||||
#![crate_name = "re_export"]
|
||||
|
||||
//@ has 're_export/fn.thingy2.html' '//pre[@class="rust item-decl"]' '#[no_mangle]'
|
||||
pub use thingymod::thingy as thingy2;
|
||||
|
||||
mod thingymod {
|
||||
#[no_mangle]
|
||||
pub fn thingy() {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user