Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 2 additions & 8 deletions src/librustdoc/html/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -965,14 +965,8 @@ fn render_assoc_item(
}
}

const ALLOWED_ATTRIBUTES: &[Symbol] = &[
sym::export_name,
sym::link_section,
sym::must_use,
sym::no_mangle,
sym::repr,
sym::non_exhaustive,
];
const ALLOWED_ATTRIBUTES: &[Symbol] =
&[sym::export_name, sym::link_section, sym::no_mangle, sym::repr, sym::non_exhaustive];

fn attributes(it: &clean::Item) -> Vec<String> {
it.attrs
Expand Down
8 changes: 0 additions & 8 deletions src/test/rustdoc/attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@ pub extern "C" fn f() {}
#[export_name = "bar"]
pub extern "C" fn g() {}

// @matches foo/enum.Foo.html '//*[@class="rust enum"]' \
// '#\[repr\(i64\)\]\n#\[must_use\]'
#[repr(i64)]
#[must_use]
pub enum Foo {
Bar,
}

// @has foo/struct.Repr.html '//*[@class="docblock type-decl"]' '#[repr(C, align(8))]'
#[repr(C, align(8))]
pub struct Repr;
3 changes: 1 addition & 2 deletions src/test/rustdoc/cap-lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
// therefore should not concern itself with the lints.
#[deny(warnings)]

// @has cap_lints/struct.Foo.html //pre '#[must_use]'
#[must_use]
// @has cap_lints/struct.Foo.html //* 'Struct Foo'
pub struct Foo {
field: i32,
}
11 changes: 0 additions & 11 deletions src/test/rustdoc/must-use.rs

This file was deleted.

21 changes: 0 additions & 21 deletions src/test/rustdoc/trait-attributes.rs

This file was deleted.