File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -233,11 +233,9 @@ impl_lint_pass!(LiteralDigitGrouping => [
233
233
234
234
impl EarlyLintPass for LiteralDigitGrouping {
235
235
fn check_expr ( & mut self , cx : & EarlyContext < ' _ > , expr : & Expr ) {
236
- if in_external_macro ( cx. sess ( ) , expr. span ) {
237
- return ;
238
- }
239
-
240
- if let ExprKind :: Lit ( lit) = expr. kind {
236
+ if let ExprKind :: Lit ( lit) = expr. kind
237
+ && !in_external_macro ( cx. sess ( ) , expr. span )
238
+ {
241
239
self . check_lit ( cx, lit, expr. span ) ;
242
240
}
243
241
}
@@ -448,11 +446,9 @@ impl_lint_pass!(DecimalLiteralRepresentation => [DECIMAL_LITERAL_REPRESENTATION]
448
446
449
447
impl EarlyLintPass for DecimalLiteralRepresentation {
450
448
fn check_expr ( & mut self , cx : & EarlyContext < ' _ > , expr : & Expr ) {
451
- if in_external_macro ( cx. sess ( ) , expr. span ) {
452
- return ;
453
- }
454
-
455
- if let ExprKind :: Lit ( lit) = expr. kind {
449
+ if let ExprKind :: Lit ( lit) = expr. kind
450
+ && !in_external_macro ( cx. sess ( ) , expr. span )
451
+ {
456
452
self . check_lit ( cx, lit, expr. span ) ;
457
453
}
458
454
}
You can’t perform that action at this time.
0 commit comments