Skip to main content

span_of_clippy_attr

Function span_of_clippy_attr 

Source
pub fn span_of_clippy_attr(attr: &(impl AttributeExt + 'static)) -> Span
Expand description

Retrieves the span of a Clippy attribute, such as #[clippy::format_args].

Panics if used on an attribute that isn’t a tool attribute, so always check for that first with e.g. path or path_matches.