1
1
mod builtin_type_shadow;
2
2
mod double_neg;
3
+ mod literal_suffix;
3
4
mod mixed_case_hex_literals;
4
5
mod redundant_pattern;
5
6
mod unneeded_field_pattern;
6
7
mod unneeded_wildcard_pattern;
7
- mod unseparated_literal_suffix;
8
8
mod zero_prefixed_literal;
9
9
10
10
use clippy_utils:: diagnostics:: span_lint;
@@ -142,7 +142,7 @@ declare_clippy_lint! {
142
142
/// // Good
143
143
/// let y = 123832i32;
144
144
/// ```
145
- pub UNSEPARATED_LITERAL_SUFFIX ,
145
+ pub LITERAL_SUFFIX ,
146
146
restriction,
147
147
"literals whose suffix is not separated by an underscore"
148
148
}
@@ -279,7 +279,7 @@ impl_lint_pass!(MiscEarlyLints => [
279
279
DUPLICATE_UNDERSCORE_ARGUMENT ,
280
280
DOUBLE_NEG ,
281
281
MIXED_CASE_HEX_LITERALS ,
282
- UNSEPARATED_LITERAL_SUFFIX ,
282
+ LITERAL_SUFFIX ,
283
283
ZERO_PREFIXED_LITERAL ,
284
284
BUILTIN_TYPE_SHADOW ,
285
285
REDUNDANT_PATTERN ,
@@ -369,7 +369,7 @@ impl MiscEarlyLints {
369
369
LitIntType :: Unsigned ( ty) => ty. name_str ( ) ,
370
370
LitIntType :: Unsuffixed => "" ,
371
371
} ;
372
- unseparated_literal_suffix :: check ( cx, lit, & lit_snip, suffix, "integer" , self . literal_suffix_style ) ;
372
+ literal_suffix :: check ( cx, lit, & lit_snip, suffix, "integer" , self . literal_suffix_style ) ;
373
373
if lit_snip. starts_with ( "0x" ) {
374
374
mixed_case_hex_literals:: check ( cx, lit, suffix, & lit_snip) ;
375
375
} else if lit_snip. starts_with ( "0b" ) || lit_snip. starts_with ( "0o" ) {
@@ -379,7 +379,7 @@ impl MiscEarlyLints {
379
379
}
380
380
} else if let LitKind :: Float ( _, LitFloatType :: Suffixed ( float_ty) ) = lit. kind {
381
381
let suffix = float_ty. name_str ( ) ;
382
- unseparated_literal_suffix :: check ( cx, lit, & lit_snip, suffix, "float" , self . literal_suffix_style ) ;
382
+ literal_suffix :: check ( cx, lit, & lit_snip, suffix, "float" , self . literal_suffix_style ) ;
383
383
}
384
384
}
385
385
}
0 commit comments