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 => [
233233
234234impl EarlyLintPass for LiteralDigitGrouping {
235235 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+ {
241239 self . check_lit ( cx, lit, expr. span ) ;
242240 }
243241 }
@@ -448,11 +446,9 @@ impl_lint_pass!(DecimalLiteralRepresentation => [DECIMAL_LITERAL_REPRESENTATION]
448446
449447impl EarlyLintPass for DecimalLiteralRepresentation {
450448 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+ {
456452 self . check_lit ( cx, lit, expr. span ) ;
457453 }
458454 }
You can’t perform that action at this time.
0 commit comments