Skip to content

Commit c26ae66

Browse files
Fix rustdoc not correctly showing attributes with re-exports
Signed-off-by: Jonathan Brouwer <[email protected]>
1 parent e61dd43 commit c26ae66

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/librustdoc/clean/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2746,7 +2746,7 @@ fn add_without_unwanted_attributes<'hir>(
27462746
attrs.push((Cow::Owned(attr), import_parent));
27472747
}
27482748
}
2749-
hir::Attribute::Parsed(..) if is_inline => {
2749+
hir::Attribute::Parsed(..) => {
27502750
attrs.push((Cow::Owned(attr), import_parent));
27512751
}
27522752
_ => {}

tests/rustdoc/attributes-re-export.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//@ edition:2021
2+
#![crate_name = "re_export"]
3+
4+
//@ has 're_export/fn.thingy2.html' '//pre[@class="rust item-decl"]' '#[no_mangle]'
5+
pub use thingymod::thingy as thingy2;
6+
7+
mod thingymod {
8+
#[no_mangle]
9+
pub fn thingy() {
10+
11+
}
12+
}

0 commit comments

Comments
 (0)