Skip to main content

get_clippy_attr

Function get_clippy_attr 

Source
pub fn get_clippy_attr(
    tcx: TyCtxt<'_>,
    did: impl Into<DefId>,
    name: Symbol,
) -> Option<&AttrItem>
Expand description

Returns the first occurrence of #[clippy::<name>].

Additionally, raises an error for duplicates of this attribute.