Stop lint from checking code expanded from macros.

This commit is contained in:
S. van Dijk 2022-09-11 20:15:35 +02:00
parent 69f6009f85
commit 178f502970
No known key found for this signature in database
GPG Key ID: 15A87C95891B3301

View File

@ -79,6 +79,7 @@ fn check_range(cx: &EarlyContext<'_>, span: Span, start: &Expr, end: &Expr, sugg
(LitKind::Byte(b'a') | LitKind::Char('a'), LitKind::Byte(b'z') | LitKind::Char('z'))
| (LitKind::Byte(b'A') | LitKind::Char('A'), LitKind::Byte(b'Z') | LitKind::Char('Z'))
)
&& !span.from_expansion()
{
span_lint_and_then(
cx,