@@ -153,6 +153,7 @@ mod utils;
153153mod approx_const;
154154mod arithmetic;
155155mod as_conversions;
156+ mod asm_syntax;
156157mod assertions_on_constants;
157158mod assign_ops;
158159mod async_yields_async;
@@ -176,6 +177,7 @@ mod dbg_macro;
176177mod default_trait_access;
177178mod dereference;
178179mod derive;
180+ mod disallowed_method;
179181mod doc;
180182mod double_comparison;
181183mod double_parens;
@@ -489,6 +491,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
489491 & arithmetic:: FLOAT_ARITHMETIC ,
490492 & arithmetic:: INTEGER_ARITHMETIC ,
491493 & as_conversions:: AS_CONVERSIONS ,
494+ & asm_syntax:: INLINE_ASM_X86_ATT_SYNTAX ,
495+ & asm_syntax:: INLINE_ASM_X86_INTEL_SYNTAX ,
492496 & assertions_on_constants:: ASSERTIONS_ON_CONSTANTS ,
493497 & assign_ops:: ASSIGN_OP_PATTERN ,
494498 & assign_ops:: MISREFACTORED_ASSIGN_OP ,
@@ -529,6 +533,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
529533 & derive:: DERIVE_ORD_XOR_PARTIAL_ORD ,
530534 & derive:: EXPL_IMPL_CLONE_ON_COPY ,
531535 & derive:: UNSAFE_DERIVE_DESERIALIZE ,
536+ & disallowed_method:: DISALLOWED_METHOD ,
532537 & doc:: DOC_MARKDOWN ,
533538 & doc:: MISSING_ERRORS_DOC ,
534539 & doc:: MISSING_SAFETY_DOC ,
@@ -851,9 +856,9 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
851856 & types:: UNIT_CMP ,
852857 & types:: UNNECESSARY_CAST ,
853858 & types:: VEC_BOX ,
859+ & unicode:: INVISIBLE_CHARACTERS ,
854860 & unicode:: NON_ASCII_LITERAL ,
855861 & unicode:: UNICODE_NOT_NFC ,
856- & unicode:: ZERO_WIDTH_SPACE ,
857862 & unit_return_expecting_ord:: UNIT_RETURN_EXPECTING_ORD ,
858863 & unnamed_address:: FN_ADDRESS_COMPARISONS ,
859864 & unnamed_address:: VTABLE_ADDRESS_COMPARISONS ,
@@ -1120,11 +1125,18 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
11201125 store. register_late_pass ( || box async_yields_async:: AsyncYieldsAsync ) ;
11211126 store. register_late_pass ( || box manual_strip:: ManualStrip ) ;
11221127 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+
11231133
11241134 store. register_group ( true , "clippy::restriction" , Some ( "clippy_restriction" ) , vec ! [
11251135 LintId :: of( & arithmetic:: FLOAT_ARITHMETIC ) ,
11261136 LintId :: of( & arithmetic:: INTEGER_ARITHMETIC ) ,
11271137 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 ) ,
11281140 LintId :: of( & create_dir:: CREATE_DIR ) ,
11291141 LintId :: of( & dbg_macro:: DBG_MACRO ) ,
11301142 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:
14991511 LintId :: of( & types:: UNIT_CMP ) ,
15001512 LintId :: of( & types:: UNNECESSARY_CAST ) ,
15011513 LintId :: of( & types:: VEC_BOX ) ,
1502- LintId :: of( & unicode:: ZERO_WIDTH_SPACE ) ,
1514+ LintId :: of( & unicode:: INVISIBLE_CHARACTERS ) ,
15031515 LintId :: of( & unit_return_expecting_ord:: UNIT_RETURN_EXPECTING_ORD ) ,
15041516 LintId :: of( & unnamed_address:: FN_ADDRESS_COMPARISONS ) ,
15051517 LintId :: of( & unnamed_address:: VTABLE_ADDRESS_COMPARISONS ) ,
@@ -1592,6 +1604,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
15921604 LintId :: of( & mut_reference:: UNNECESSARY_MUT_PASSED ) ,
15931605 LintId :: of( & neg_multiply:: NEG_MULTIPLY ) ,
15941606 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 ) ,
15951609 LintId :: of( & non_expressive_names:: JUST_UNDERSCORES_AND_DIGITS ) ,
15961610 LintId :: of( & non_expressive_names:: MANY_SINGLE_CHAR_NAMES ) ,
15971611 LintId :: of( & panic_unimplemented:: PANIC_PARAMS ) ,
@@ -1747,8 +1761,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
17471761 LintId :: of( & misc:: FLOAT_CMP ) ,
17481762 LintId :: of( & misc:: MODULO_ONE ) ,
17491763 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 ) ,
17521764 LintId :: of( & open_options:: NONSENSICAL_OPEN_OPTIONS ) ,
17531765 LintId :: of( & option_env_unwrap:: OPTION_ENV_UNWRAP ) ,
17541766 LintId :: of( & ptr:: MUT_FROM_REF ) ,
@@ -1766,7 +1778,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
17661778 LintId :: of( & types:: ABSURD_EXTREME_COMPARISONS ) ,
17671779 LintId :: of( & types:: CAST_REF_TO_MUT ) ,
17681780 LintId :: of( & types:: UNIT_CMP ) ,
1769- LintId :: of( & unicode:: ZERO_WIDTH_SPACE ) ,
1781+ LintId :: of( & unicode:: INVISIBLE_CHARACTERS ) ,
17701782 LintId :: of( & unit_return_expecting_ord:: UNIT_RETURN_EXPECTING_ORD ) ,
17711783 LintId :: of( & unnamed_address:: FN_ADDRESS_COMPARISONS ) ,
17721784 LintId :: of( & unnamed_address:: VTABLE_ADDRESS_COMPARISONS ) ,
@@ -1807,6 +1819,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
18071819 store. register_group ( true , "clippy::nursery" , Some ( "clippy_nursery" ) , vec ! [
18081820 LintId :: of( & attrs:: EMPTY_LINE_AFTER_OUTER_ATTR ) ,
18091821 LintId :: of( & cognitive_complexity:: COGNITIVE_COMPLEXITY ) ,
1822+ LintId :: of( & disallowed_method:: DISALLOWED_METHOD ) ,
18101823 LintId :: of( & fallible_impl_from:: FALLIBLE_IMPL_FROM ) ,
18111824 LintId :: of( & floating_point_arithmetic:: IMPRECISE_FLOPS ) ,
18121825 LintId :: of( & floating_point_arithmetic:: SUBOPTIMAL_FLOPS ) ,
@@ -1896,6 +1909,7 @@ pub fn register_renamed(ls: &mut rustc_lint::LintStore) {
18961909 ls. register_renamed ( "clippy::for_loop_over_option" , "clippy::for_loops_over_fallibles" ) ;
18971910 ls. register_renamed ( "clippy::for_loop_over_result" , "clippy::for_loops_over_fallibles" ) ;
18981911 ls. register_renamed ( "clippy::identity_conversion" , "clippy::useless_conversion" ) ;
1912+ ls. register_renamed ( "clippy::zero_width_space" , "clippy::invisible_characters" ) ;
18991913}
19001914
19011915// only exists to let the dogfood integration test works.
0 commit comments