rustc_builtin_macros::util

Function warn_on_duplicate_attribute

Source
pub(crate) fn warn_on_duplicate_attribute(
    ecx: &ExtCtxt<'_>,
    item: &Annotatable,
    name: Symbol,
)
Expand description

Emit a warning if the item is annotated with the given attribute. This is used to diagnose when an attribute may have been mistakenly duplicated.