1
Fork 0

Remove must_use from ALLOWED_ATTRIBUTES

This is a fairly common attribute on methods, but is not something you
need to know when reading the method docs - the purpose of the attribute
is for the compiler to tell you about it if you forget to use a value.

Removing reclaims some valuable space in the summary of methods.
This commit is contained in:
Jacob Hoffman-Andrews 2021-06-13 15:38:44 -07:00
parent 0a8629bff6
commit 74e8e7bb60
5 changed files with 3 additions and 50 deletions

View file

@ -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