mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
literal_representation
: Delay macro check.
This commit is contained in:
parent
15f640a7cb
commit
c0fa6a92f0
@ -233,11 +233,9 @@ impl_lint_pass!(LiteralDigitGrouping => [
|
||||
|
||||
impl EarlyLintPass for LiteralDigitGrouping {
|
||||
fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) {
|
||||
if in_external_macro(cx.sess(), expr.span) {
|
||||
return;
|
||||
}
|
||||
|
||||
if let ExprKind::Lit(lit) = expr.kind {
|
||||
if let ExprKind::Lit(lit) = expr.kind
|
||||
&& !in_external_macro(cx.sess(), expr.span)
|
||||
{
|
||||
self.check_lit(cx, lit, expr.span);
|
||||
}
|
||||
}
|
||||
@ -448,11 +446,9 @@ impl_lint_pass!(DecimalLiteralRepresentation => [DECIMAL_LITERAL_REPRESENTATION]
|
||||
|
||||
impl EarlyLintPass for DecimalLiteralRepresentation {
|
||||
fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) {
|
||||
if in_external_macro(cx.sess(), expr.span) {
|
||||
return;
|
||||
}
|
||||
|
||||
if let ExprKind::Lit(lit) = expr.kind {
|
||||
if let ExprKind::Lit(lit) = expr.kind
|
||||
&& !in_external_macro(cx.sess(), expr.span)
|
||||
{
|
||||
self.check_lit(cx, lit, expr.span);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user