File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -390,6 +390,10 @@ impl EarlyLintPass for MiscEarlyLints {
390
390
391
391
impl MiscEarlyLints {
392
392
fn check_lit ( self , cx : & EarlyContext < ' _ > , lit : & Lit ) {
393
+ if in_external_macro ( cx. sess ( ) , lit. span ) {
394
+ return ;
395
+ }
396
+
393
397
if let LitKind :: Int ( value, lit_int_type) = lit. node {
394
398
if let Some ( src) = snippet_opt ( cx, lit. span ) {
395
399
let suffix = match lit_int_type {
@@ -440,7 +444,7 @@ impl MiscEarlyLints {
440
444
|db| {
441
445
db. span_suggestion (
442
446
lit. span ,
443
- "if you mean to use a decimal constant, remove the `0` to remove confusion" ,
447
+ "if you mean to use a decimal constant, remove the `0` to avoid confusion" ,
444
448
src. trim_start_matches ( |c| c == '_' || c == '0' ) . to_string ( ) ,
445
449
Applicability :: MaybeIncorrect ,
446
450
) ;
You can’t perform that action at this time.
0 commit comments