Function clippy_utils::source::span_starts_with
source · [−]pub fn span_starts_with<T: LintContext>(cx: &T, span: Span, text: &str) -> boolExpand description
Checks if the span starts with the given text. This will return false if the span crosses multiple files or if source is not available.
This is used to check for proc macros giving unhelpful spans to things.