Skip to content

rustdoc: Fix missing repr attribute in doc(inline) on foreign items #110901

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 28, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add regression test for #110698
  • Loading branch information
GuillaumeGomez committed Apr 27, 2023
commit 3f082843aa19d2bb51531688770eeae401249ceb
4 changes: 4 additions & 0 deletions tests/rustdoc/inline_cross/auxiliary/repr.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#[repr(C)]
pub struct Foo {
field: u8,
}
13 changes: 13 additions & 0 deletions tests/rustdoc/inline_cross/repr.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Regression test for <https://github.com/rust-lang/rust/issues/110698>.
// This test ensures that the re-exported items still have the `#[repr(...)]` attribute.

// aux-build:repr.rs

#![crate_name = "foo"]

extern crate repr;

// @has 'foo/struct.Foo.html'
// @has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(C)]'
#[doc(inline)]
pub use repr::Foo;