@@ -153,6 +153,7 @@ mod utils;
153
153
mod approx_const;
154
154
mod arithmetic;
155
155
mod as_conversions;
156
+ mod asm_syntax;
156
157
mod assertions_on_constants;
157
158
mod assign_ops;
158
159
mod async_yields_async;
@@ -176,6 +177,7 @@ mod dbg_macro;
176
177
mod default_trait_access;
177
178
mod dereference;
178
179
mod derive;
180
+ mod disallowed_method;
179
181
mod doc;
180
182
mod double_comparison;
181
183
mod double_parens;
@@ -489,6 +491,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
489
491
& arithmetic:: FLOAT_ARITHMETIC ,
490
492
& arithmetic:: INTEGER_ARITHMETIC ,
491
493
& as_conversions:: AS_CONVERSIONS ,
494
+ & asm_syntax:: INLINE_ASM_X86_ATT_SYNTAX ,
495
+ & asm_syntax:: INLINE_ASM_X86_INTEL_SYNTAX ,
492
496
& assertions_on_constants:: ASSERTIONS_ON_CONSTANTS ,
493
497
& assign_ops:: ASSIGN_OP_PATTERN ,
494
498
& assign_ops:: MISREFACTORED_ASSIGN_OP ,
@@ -529,6 +533,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
529
533
& derive:: DERIVE_ORD_XOR_PARTIAL_ORD ,
530
534
& derive:: EXPL_IMPL_CLONE_ON_COPY ,
531
535
& derive:: UNSAFE_DERIVE_DESERIALIZE ,
536
+ & disallowed_method:: DISALLOWED_METHOD ,
532
537
& doc:: DOC_MARKDOWN ,
533
538
& doc:: MISSING_ERRORS_DOC ,
534
539
& doc:: MISSING_SAFETY_DOC ,
@@ -851,9 +856,9 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
851
856
& types:: UNIT_CMP ,
852
857
& types:: UNNECESSARY_CAST ,
853
858
& types:: VEC_BOX ,
859
+ & unicode:: INVISIBLE_CHARACTERS ,
854
860
& unicode:: NON_ASCII_LITERAL ,
855
861
& unicode:: UNICODE_NOT_NFC ,
856
- & unicode:: ZERO_WIDTH_SPACE ,
857
862
& unit_return_expecting_ord:: UNIT_RETURN_EXPECTING_ORD ,
858
863
& unnamed_address:: FN_ADDRESS_COMPARISONS ,
859
864
& unnamed_address:: VTABLE_ADDRESS_COMPARISONS ,
@@ -1120,11 +1125,18 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1120
1125
store. register_late_pass ( || box async_yields_async:: AsyncYieldsAsync ) ;
1121
1126
store. register_late_pass ( || box manual_strip:: ManualStrip ) ;
1122
1127
store. register_late_pass ( || box utils:: internal_lints:: MatchTypeOnDiagItem ) ;
1128
+ let disallowed_methods = conf. disallowed_methods . iter ( ) . cloned ( ) . collect :: < FxHashSet < _ > > ( ) ;
1129
+ store. register_late_pass ( move || box disallowed_method:: DisallowedMethod :: new ( & disallowed_methods) ) ;
1130
+ store. register_early_pass ( || box asm_syntax:: InlineAsmX86AttSyntax ) ;
1131
+ store. register_early_pass ( || box asm_syntax:: InlineAsmX86IntelSyntax ) ;
1132
+
1123
1133
1124
1134
store. register_group ( true , "clippy::restriction" , Some ( "clippy_restriction" ) , vec ! [
1125
1135
LintId :: of( & arithmetic:: FLOAT_ARITHMETIC ) ,
1126
1136
LintId :: of( & arithmetic:: INTEGER_ARITHMETIC ) ,
1127
1137
LintId :: of( & as_conversions:: AS_CONVERSIONS ) ,
1138
+ LintId :: of( & asm_syntax:: INLINE_ASM_X86_ATT_SYNTAX ) ,
1139
+ LintId :: of( & asm_syntax:: INLINE_ASM_X86_INTEL_SYNTAX ) ,
1128
1140
LintId :: of( & create_dir:: CREATE_DIR ) ,
1129
1141
LintId :: of( & dbg_macro:: DBG_MACRO ) ,
1130
1142
LintId :: of( & else_if_without_else:: ELSE_IF_WITHOUT_ELSE ) ,
@@ -1499,7 +1511,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1499
1511
LintId :: of( & types:: UNIT_CMP ) ,
1500
1512
LintId :: of( & types:: UNNECESSARY_CAST ) ,
1501
1513
LintId :: of( & types:: VEC_BOX ) ,
1502
- LintId :: of( & unicode:: ZERO_WIDTH_SPACE ) ,
1514
+ LintId :: of( & unicode:: INVISIBLE_CHARACTERS ) ,
1503
1515
LintId :: of( & unit_return_expecting_ord:: UNIT_RETURN_EXPECTING_ORD ) ,
1504
1516
LintId :: of( & unnamed_address:: FN_ADDRESS_COMPARISONS ) ,
1505
1517
LintId :: of( & unnamed_address:: VTABLE_ADDRESS_COMPARISONS ) ,
@@ -1592,6 +1604,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1592
1604
LintId :: of( & mut_reference:: UNNECESSARY_MUT_PASSED ) ,
1593
1605
LintId :: of( & neg_multiply:: NEG_MULTIPLY ) ,
1594
1606
LintId :: of( & new_without_default:: NEW_WITHOUT_DEFAULT ) ,
1607
+ LintId :: of( & non_copy_const:: BORROW_INTERIOR_MUTABLE_CONST ) ,
1608
+ LintId :: of( & non_copy_const:: DECLARE_INTERIOR_MUTABLE_CONST ) ,
1595
1609
LintId :: of( & non_expressive_names:: JUST_UNDERSCORES_AND_DIGITS ) ,
1596
1610
LintId :: of( & non_expressive_names:: MANY_SINGLE_CHAR_NAMES ) ,
1597
1611
LintId :: of( & panic_unimplemented:: PANIC_PARAMS ) ,
@@ -1747,8 +1761,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1747
1761
LintId :: of( & misc:: FLOAT_CMP ) ,
1748
1762
LintId :: of( & misc:: MODULO_ONE ) ,
1749
1763
LintId :: of( & mut_key:: MUTABLE_KEY_TYPE ) ,
1750
- LintId :: of( & non_copy_const:: BORROW_INTERIOR_MUTABLE_CONST ) ,
1751
- LintId :: of( & non_copy_const:: DECLARE_INTERIOR_MUTABLE_CONST ) ,
1752
1764
LintId :: of( & open_options:: NONSENSICAL_OPEN_OPTIONS ) ,
1753
1765
LintId :: of( & option_env_unwrap:: OPTION_ENV_UNWRAP ) ,
1754
1766
LintId :: of( & ptr:: MUT_FROM_REF ) ,
@@ -1766,7 +1778,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1766
1778
LintId :: of( & types:: ABSURD_EXTREME_COMPARISONS ) ,
1767
1779
LintId :: of( & types:: CAST_REF_TO_MUT ) ,
1768
1780
LintId :: of( & types:: UNIT_CMP ) ,
1769
- LintId :: of( & unicode:: ZERO_WIDTH_SPACE ) ,
1781
+ LintId :: of( & unicode:: INVISIBLE_CHARACTERS ) ,
1770
1782
LintId :: of( & unit_return_expecting_ord:: UNIT_RETURN_EXPECTING_ORD ) ,
1771
1783
LintId :: of( & unnamed_address:: FN_ADDRESS_COMPARISONS ) ,
1772
1784
LintId :: of( & unnamed_address:: VTABLE_ADDRESS_COMPARISONS ) ,
@@ -1807,6 +1819,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1807
1819
store. register_group ( true , "clippy::nursery" , Some ( "clippy_nursery" ) , vec ! [
1808
1820
LintId :: of( & attrs:: EMPTY_LINE_AFTER_OUTER_ATTR ) ,
1809
1821
LintId :: of( & cognitive_complexity:: COGNITIVE_COMPLEXITY ) ,
1822
+ LintId :: of( & disallowed_method:: DISALLOWED_METHOD ) ,
1810
1823
LintId :: of( & fallible_impl_from:: FALLIBLE_IMPL_FROM ) ,
1811
1824
LintId :: of( & floating_point_arithmetic:: IMPRECISE_FLOPS ) ,
1812
1825
LintId :: of( & floating_point_arithmetic:: SUBOPTIMAL_FLOPS ) ,
@@ -1896,6 +1909,7 @@ pub fn register_renamed(ls: &mut rustc_lint::LintStore) {
1896
1909
ls. register_renamed ( "clippy::for_loop_over_option" , "clippy::for_loops_over_fallibles" ) ;
1897
1910
ls. register_renamed ( "clippy::for_loop_over_result" , "clippy::for_loops_over_fallibles" ) ;
1898
1911
ls. register_renamed ( "clippy::identity_conversion" , "clippy::useless_conversion" ) ;
1912
+ ls. register_renamed ( "clippy::zero_width_space" , "clippy::invisible_characters" ) ;
1899
1913
}
1900
1914
1901
1915
// only exists to let the dogfood integration test works.
0 commit comments