]> git.lizzy.rs Git - rust.git/blob - src/lib.rs
Merge pull request #911 from cuviper/rustup
[rust.git] / src / lib.rs
1 #![feature(type_macros)]
2 #![feature(plugin_registrar, box_syntax)]
3 #![feature(rustc_private, collections)]
4 #![feature(iter_arith)]
5 #![feature(custom_attribute)]
6 #![feature(slice_patterns)]
7 #![feature(question_mark)]
8 #![feature(stmt_expr_attributes)]
9 #![allow(indexing_slicing, shadow_reuse, unknown_lints)]
10 #![allow(float_arithmetic, integer_arithmetic)]
11
12 extern crate rustc_driver;
13 extern crate getopts;
14
15 use rustc_driver::{driver, CompilerCalls, RustcDefaultCalls, Compilation};
16 use rustc::session::{config, Session};
17 use rustc::session::config::{Input, ErrorOutputType};
18 use syntax::diagnostics;
19 use std::path::PathBuf;
20
21 struct ClippyCompilerCalls(RustcDefaultCalls);
22
23 impl std::default::Default for ClippyCompilerCalls {
24     fn default() -> Self {
25         Self::new()
26     }
27 }
28
29 impl ClippyCompilerCalls {
30     fn new() -> Self {
31         ClippyCompilerCalls(RustcDefaultCalls)
32     }
33 }
34
35 impl<'a> CompilerCalls<'a> for ClippyCompilerCalls {
36     fn early_callback(&mut self,
37                       matches: &getopts::Matches,
38                       sopts: &config::Options,
39                       descriptions: &diagnostics::registry::Registry,
40                       output: ErrorOutputType)
41                       -> Compilation {
42         self.0.early_callback(matches, sopts, descriptions, output)
43     }
44     fn no_input(&mut self,
45                 matches: &getopts::Matches,
46                 sopts: &config::Options,
47                 odir: &Option<PathBuf>,
48                 ofile: &Option<PathBuf>,
49                 descriptions: &diagnostics::registry::Registry)
50                 -> Option<(Input, Option<PathBuf>)> {
51         self.0.no_input(matches, sopts, odir, ofile, descriptions)
52     }
53     fn late_callback(&mut self,
54                      matches: &getopts::Matches,
55                      sess: &Session,
56                      input: &Input,
57                      odir: &Option<PathBuf>,
58                      ofile: &Option<PathBuf>)
59                      -> Compilation {
60         self.0.late_callback(matches, sess, input, odir, ofile)
61     }
62     fn build_controller(&mut self, sess: &Session, matches: &getopts::Matches) -> driver::CompileController<'a> {
63         let mut control = self.0.build_controller(sess, matches);
64
65         let old = std::mem::replace(&mut control.after_parse.callback, box |_| {});
66         control.after_parse.callback = Box::new(move |state| {
67             {
68                 let mut registry = rustc_plugin::registry::Registry::new(state.session, state.krate.as_ref().expect("at this compilation stage the krate must be parsed"));
69                 registry.args_hidden = Some(Vec::new());
70                 plugin_registrar(&mut registry);
71
72                 let rustc_plugin::registry::Registry { early_lint_passes, late_lint_passes, lint_groups, llvm_passes, attributes, mir_passes, .. } = registry;
73                 let sess = &state.session;
74                 let mut ls = sess.lint_store.borrow_mut();
75                 for pass in early_lint_passes {
76                     ls.register_early_pass(Some(sess), true, pass);
77                 }
78                 for pass in late_lint_passes {
79                     ls.register_late_pass(Some(sess), true, pass);
80                 }
81
82                 for (name, to) in lint_groups {
83                     ls.register_group(Some(sess), true, name, to);
84                 }
85
86                 sess.plugin_llvm_passes.borrow_mut().extend(llvm_passes);
87                 sess.mir_passes.borrow_mut().extend(mir_passes);
88                 sess.plugin_attributes.borrow_mut().extend(attributes);
89             }
90             old(state);
91         });
92
93         control
94     }
95 }
96
97 use std::path::Path;
98
99 pub fn main() {
100     use std::env;
101
102     if env::var("CLIPPY_DOGFOOD").map(|_| true).unwrap_or(false) {
103         return;
104     }
105
106     let dep_path = env::current_dir().expect("current dir is not readable").join("target").join("debug").join("deps");
107
108     let home = option_env!("RUSTUP_HOME").or(option_env!("MULTIRUST_HOME"));
109     let toolchain = option_env!("RUSTUP_TOOLCHAIN").or(option_env!("MULTIRUST_TOOLCHAIN"));
110     let sys_root = match (home, toolchain) {
111         (Some(home), Some(toolchain)) => format!("{}/toolchains/{}", home, toolchain),
112         _ => option_env!("SYSROOT")
113                 .expect("need to specify SYSROOT env var during clippy compilation, or use rustup or multirust")
114                 .to_owned(),
115     };
116
117     if let Some("clippy") = std::env::args().nth(1).as_ref().map(AsRef::as_ref) {
118         let args = wrap_args(std::env::args().skip(2), dep_path, sys_root);
119         let path = std::env::current_exe().expect("current executable path invalid");
120         let run = std::process::Command::new("cargo")
121             .args(&args)
122             .env("RUSTC", path)
123             .spawn().expect("could not run cargo")
124             .wait().expect("failed to wait for cargo?")
125             .success();
126         assert!(run, "cargo rustc failed");
127     } else {
128         let args: Vec<String> = if env::args().any(|s| s == "--sysroot") {
129             env::args().collect()
130         } else {
131             env::args().chain(Some("--sysroot".to_owned())).chain(Some(sys_root)).collect()
132         };
133         rustc_driver::run_compiler(&args, &mut ClippyCompilerCalls::new());
134     }
135 }
136
137 fn wrap_args<P, I>(old_args: I, dep_path: P, sysroot: String) -> Vec<String>
138     where P: AsRef<Path>, I: Iterator<Item=String> {
139
140     let mut args = vec!["rustc".to_owned()];
141
142     let mut found_dashes = false;
143     for arg in old_args {
144         found_dashes |= arg == "--";
145         args.push(arg);
146     }
147     if !found_dashes {
148         args.push("--".to_owned());
149     }
150     args.push("-L".to_owned());
151     args.push(dep_path.as_ref().to_string_lossy().into_owned());
152     args.push(String::from("--sysroot"));
153     args.push(sysroot);
154     args.push("-Zno-trans".to_owned());
155     args
156 }
157
158 #[macro_use]
159 extern crate syntax;
160 #[macro_use]
161 extern crate rustc;
162
163 extern crate toml;
164
165 // Only for the compile time checking of paths
166 extern crate core;
167 extern crate collections;
168
169 // for unicode nfc normalization
170 extern crate unicode_normalization;
171
172 // for semver check in attrs.rs
173 extern crate semver;
174
175 // for regex checking
176 extern crate regex_syntax;
177
178 // for finding minimal boolean expressions
179 extern crate quine_mc_cluskey;
180
181 extern crate rustc_plugin;
182 extern crate rustc_const_eval;
183 extern crate rustc_const_math;
184 use rustc_plugin::Registry;
185
186 macro_rules! declare_restriction_lint {
187     { pub $name:tt, $description:tt } => {
188         declare_lint! { pub $name, Allow, $description }
189     };
190 }
191
192 pub mod consts;
193 #[macro_use]
194 pub mod utils;
195
196 // begin lints modules, do not remove this comment, it’s used in `update_lints`
197 pub mod approx_const;
198 pub mod arithmetic;
199 pub mod array_indexing;
200 pub mod attrs;
201 pub mod bit_mask;
202 pub mod blacklisted_name;
203 pub mod block_in_if_condition;
204 pub mod booleans;
205 pub mod collapsible_if;
206 pub mod copies;
207 pub mod cyclomatic_complexity;
208 pub mod derive;
209 pub mod doc;
210 pub mod drop_ref;
211 pub mod entry;
212 pub mod enum_clike;
213 pub mod enum_glob_use;
214 pub mod enum_variants;
215 pub mod eq_op;
216 pub mod escape;
217 pub mod eta_reduction;
218 pub mod format;
219 pub mod formatting;
220 pub mod functions;
221 pub mod identity_op;
222 pub mod if_not_else;
223 pub mod items_after_statements;
224 pub mod len_zero;
225 pub mod lifetimes;
226 pub mod loops;
227 pub mod map_clone;
228 pub mod matches;
229 pub mod mem_forget;
230 pub mod methods;
231 pub mod minmax;
232 pub mod misc;
233 pub mod misc_early;
234 pub mod mut_mut;
235 pub mod mut_reference;
236 pub mod mutex_atomic;
237 pub mod needless_bool;
238 pub mod needless_borrow;
239 pub mod needless_update;
240 pub mod neg_multiply;
241 pub mod new_without_default;
242 pub mod no_effect;
243 pub mod non_expressive_names;
244 pub mod open_options;
245 pub mod overflow_check_conditional;
246 pub mod panic;
247 pub mod precedence;
248 pub mod print;
249 pub mod ptr_arg;
250 pub mod ranges;
251 pub mod regex;
252 pub mod returns;
253 pub mod shadow;
254 pub mod strings;
255 pub mod swap;
256 pub mod temporary_assignment;
257 pub mod transmute;
258 pub mod types;
259 pub mod unicode;
260 pub mod unsafe_removed_from_name;
261 pub mod unused_label;
262 pub mod vec;
263 pub mod zero_div_zero;
264 // end lints modules, do not remove this comment, it’s used in `update_lints`
265
266 mod reexport {
267     pub use syntax::ast::{Name, NodeId};
268 }
269
270 #[plugin_registrar]
271 #[cfg_attr(rustfmt, rustfmt_skip)]
272 pub fn plugin_registrar(reg: &mut Registry) {
273     let conf = match utils::conf::conf_file(reg.args()) {
274         Ok(file_name) => {
275             // if the user specified a file, it must exist, otherwise default to `clippy.toml` but
276             // do not require the file to exist
277             let (ref file_name, must_exist) = if let Some(ref file_name) = file_name {
278                 (&**file_name, true)
279             } else {
280                 ("clippy.toml", false)
281             };
282
283             let (conf, errors) = utils::conf::read_conf(file_name, must_exist);
284
285             // all conf errors are non-fatal, we just use the default conf in case of error
286             for error in errors {
287                 reg.sess.struct_err(&format!("error reading Clippy's configuration file: {}", error)).emit();
288             }
289
290             conf
291         }
292         Err((err, span)) => {
293             reg.sess.struct_span_err(span, err)
294                     .span_note(span, "Clippy will use default configuration")
295                     .emit();
296             utils::conf::Conf::default()
297         }
298     };
299
300     let mut store = reg.sess.lint_store.borrow_mut();
301     store.register_removed("unstable_as_slice", "`Vec::as_slice` has been stabilized in 1.7");
302     store.register_removed("unstable_as_mut_slice", "`Vec::as_mut_slice` has been stabilized in 1.7");
303     store.register_removed("str_to_string", "using `str::to_string` is common even today and specialization will likely happen soon");
304     store.register_removed("string_to_string", "using `string::to_string` is common even today and specialization will likely happen soon");
305     // end deprecated lints, do not remove this comment, it’s used in `update_lints`
306
307     reg.register_late_lint_pass(box types::TypePass);
308     reg.register_late_lint_pass(box booleans::NonminimalBool);
309     reg.register_late_lint_pass(box misc::TopLevelRefPass);
310     reg.register_late_lint_pass(box misc::CmpNan);
311     reg.register_late_lint_pass(box eq_op::EqOp);
312     reg.register_early_lint_pass(box enum_variants::EnumVariantNames);
313     reg.register_late_lint_pass(box enum_glob_use::EnumGlobUse);
314     reg.register_late_lint_pass(box enum_clike::EnumClikeUnportableVariant);
315     reg.register_late_lint_pass(box bit_mask::BitMask);
316     reg.register_late_lint_pass(box ptr_arg::PtrArg);
317     reg.register_late_lint_pass(box needless_bool::NeedlessBool);
318     reg.register_late_lint_pass(box needless_bool::BoolComparison);
319     reg.register_late_lint_pass(box approx_const::ApproxConstant);
320     reg.register_late_lint_pass(box misc::FloatCmp);
321     reg.register_early_lint_pass(box precedence::Precedence);
322     reg.register_late_lint_pass(box eta_reduction::EtaPass);
323     reg.register_late_lint_pass(box identity_op::IdentityOp);
324     reg.register_early_lint_pass(box items_after_statements::ItemsAfterStatements);
325     reg.register_late_lint_pass(box mut_mut::MutMut);
326     reg.register_late_lint_pass(box mut_reference::UnnecessaryMutPassed);
327     reg.register_late_lint_pass(box len_zero::LenZero);
328     reg.register_late_lint_pass(box misc::CmpOwned);
329     reg.register_late_lint_pass(box attrs::AttrPass);
330     reg.register_late_lint_pass(box collapsible_if::CollapsibleIf);
331     reg.register_late_lint_pass(box block_in_if_condition::BlockInIfCondition);
332     reg.register_late_lint_pass(box misc::ModuloOne);
333     reg.register_late_lint_pass(box unicode::Unicode);
334     reg.register_late_lint_pass(box strings::StringAdd);
335     reg.register_early_lint_pass(box returns::ReturnPass);
336     reg.register_late_lint_pass(box methods::MethodsPass);
337     reg.register_late_lint_pass(box shadow::ShadowPass);
338     reg.register_late_lint_pass(box types::LetPass);
339     reg.register_late_lint_pass(box types::UnitCmp);
340     reg.register_late_lint_pass(box loops::LoopsPass);
341     reg.register_late_lint_pass(box lifetimes::LifetimePass);
342     reg.register_late_lint_pass(box entry::HashMapLint);
343     reg.register_late_lint_pass(box ranges::StepByZero);
344     reg.register_late_lint_pass(box types::CastPass);
345     reg.register_late_lint_pass(box types::TypeComplexityPass::new(conf.type_complexity_threshold));
346     reg.register_late_lint_pass(box matches::MatchPass);
347     reg.register_late_lint_pass(box misc::PatternPass);
348     reg.register_late_lint_pass(box minmax::MinMaxPass);
349     reg.register_late_lint_pass(box open_options::NonSensicalOpenOptions);
350     reg.register_late_lint_pass(box zero_div_zero::ZeroDivZeroPass);
351     reg.register_late_lint_pass(box mutex_atomic::MutexAtomic);
352     reg.register_late_lint_pass(box needless_update::NeedlessUpdatePass);
353     reg.register_late_lint_pass(box needless_borrow::NeedlessBorrow);
354     reg.register_late_lint_pass(box no_effect::NoEffectPass);
355     reg.register_late_lint_pass(box map_clone::MapClonePass);
356     reg.register_late_lint_pass(box temporary_assignment::TemporaryAssignmentPass);
357     reg.register_late_lint_pass(box transmute::Transmute);
358     reg.register_late_lint_pass(box cyclomatic_complexity::CyclomaticComplexity::new(conf.cyclomatic_complexity_threshold));
359     reg.register_late_lint_pass(box escape::EscapePass);
360     reg.register_early_lint_pass(box misc_early::MiscEarly);
361     reg.register_late_lint_pass(box misc::UsedUnderscoreBinding);
362     reg.register_late_lint_pass(box array_indexing::ArrayIndexing);
363     reg.register_late_lint_pass(box panic::PanicPass);
364     reg.register_late_lint_pass(box strings::StringLitAsBytes);
365     reg.register_late_lint_pass(box derive::Derive);
366     reg.register_late_lint_pass(box types::CharLitAsU8);
367     reg.register_late_lint_pass(box print::PrintLint);
368     reg.register_late_lint_pass(box vec::UselessVec);
369     reg.register_early_lint_pass(box non_expressive_names::NonExpressiveNames {
370         max_single_char_names: conf.max_single_char_names,
371     });
372     reg.register_late_lint_pass(box drop_ref::DropRefPass);
373     reg.register_late_lint_pass(box types::AbsurdExtremeComparisons);
374     reg.register_late_lint_pass(box types::InvalidUpcastComparisons);
375     reg.register_late_lint_pass(box regex::RegexPass::default());
376     reg.register_late_lint_pass(box copies::CopyAndPaste);
377     reg.register_late_lint_pass(box format::FormatMacLint);
378     reg.register_early_lint_pass(box formatting::Formatting);
379     reg.register_late_lint_pass(box swap::Swap);
380     reg.register_early_lint_pass(box if_not_else::IfNotElse);
381     reg.register_late_lint_pass(box overflow_check_conditional::OverflowCheckConditional);
382     reg.register_late_lint_pass(box unused_label::UnusedLabel);
383     reg.register_late_lint_pass(box new_without_default::NewWithoutDefault);
384     reg.register_late_lint_pass(box blacklisted_name::BlackListedName::new(conf.blacklisted_names));
385     reg.register_late_lint_pass(box functions::Functions::new(conf.too_many_arguments_threshold));
386     reg.register_early_lint_pass(box doc::Doc::new(conf.doc_valid_idents));
387     reg.register_late_lint_pass(box neg_multiply::NegMultiply);
388     reg.register_late_lint_pass(box unsafe_removed_from_name::UnsafeNameRemoval);
389     reg.register_late_lint_pass(box mem_forget::MemForget);
390     reg.register_late_lint_pass(box arithmetic::Arithmetic::default());
391
392     reg.register_lint_group("clippy_restrictions", vec![
393         arithmetic::FLOAT_ARITHMETIC,
394         arithmetic::INTEGER_ARITHMETIC,
395     ]);
396
397     reg.register_lint_group("clippy_pedantic", vec![
398         array_indexing::INDEXING_SLICING,
399         booleans::NONMINIMAL_BOOL,
400         enum_glob_use::ENUM_GLOB_USE,
401         if_not_else::IF_NOT_ELSE,
402         items_after_statements::ITEMS_AFTER_STATEMENTS,
403         matches::SINGLE_MATCH_ELSE,
404         mem_forget::MEM_FORGET,
405         methods::OPTION_UNWRAP_USED,
406         methods::RESULT_UNWRAP_USED,
407         methods::WRONG_PUB_SELF_CONVENTION,
408         mut_mut::MUT_MUT,
409         mutex_atomic::MUTEX_INTEGER,
410         non_expressive_names::SIMILAR_NAMES,
411         print::PRINT_STDOUT,
412         print::USE_DEBUG,
413         shadow::SHADOW_REUSE,
414         shadow::SHADOW_SAME,
415         shadow::SHADOW_UNRELATED,
416         strings::STRING_ADD,
417         strings::STRING_ADD_ASSIGN,
418         types::CAST_POSSIBLE_TRUNCATION,
419         types::CAST_POSSIBLE_WRAP,
420         types::CAST_PRECISION_LOSS,
421         types::CAST_SIGN_LOSS,
422         unicode::NON_ASCII_LITERAL,
423         unicode::UNICODE_NOT_NFC,
424     ]);
425
426     reg.register_lint_group("clippy", vec![
427         approx_const::APPROX_CONSTANT,
428         array_indexing::OUT_OF_BOUNDS_INDEXING,
429         attrs::DEPRECATED_SEMVER,
430         attrs::INLINE_ALWAYS,
431         bit_mask::BAD_BIT_MASK,
432         bit_mask::INEFFECTIVE_BIT_MASK,
433         blacklisted_name::BLACKLISTED_NAME,
434         block_in_if_condition::BLOCK_IN_IF_CONDITION_EXPR,
435         block_in_if_condition::BLOCK_IN_IF_CONDITION_STMT,
436         booleans::LOGIC_BUG,
437         collapsible_if::COLLAPSIBLE_IF,
438         copies::IF_SAME_THEN_ELSE,
439         copies::IFS_SAME_COND,
440         copies::MATCH_SAME_ARMS,
441         cyclomatic_complexity::CYCLOMATIC_COMPLEXITY,
442         derive::DERIVE_HASH_XOR_EQ,
443         derive::EXPL_IMPL_CLONE_ON_COPY,
444         doc::DOC_MARKDOWN,
445         drop_ref::DROP_REF,
446         entry::MAP_ENTRY,
447         enum_clike::ENUM_CLIKE_UNPORTABLE_VARIANT,
448         enum_variants::ENUM_VARIANT_NAMES,
449         eq_op::EQ_OP,
450         escape::BOXED_LOCAL,
451         eta_reduction::REDUNDANT_CLOSURE,
452         format::USELESS_FORMAT,
453         formatting::SUSPICIOUS_ASSIGNMENT_FORMATTING,
454         formatting::SUSPICIOUS_ELSE_FORMATTING,
455         functions::TOO_MANY_ARGUMENTS,
456         identity_op::IDENTITY_OP,
457         len_zero::LEN_WITHOUT_IS_EMPTY,
458         len_zero::LEN_ZERO,
459         lifetimes::NEEDLESS_LIFETIMES,
460         lifetimes::UNUSED_LIFETIMES,
461         loops::EMPTY_LOOP,
462         loops::EXPLICIT_COUNTER_LOOP,
463         loops::EXPLICIT_ITER_LOOP,
464         loops::FOR_KV_MAP,
465         loops::FOR_LOOP_OVER_OPTION,
466         loops::FOR_LOOP_OVER_RESULT,
467         loops::ITER_NEXT_LOOP,
468         loops::NEEDLESS_RANGE_LOOP,
469         loops::REVERSE_RANGE_LOOP,
470         loops::UNUSED_COLLECT,
471         loops::WHILE_LET_LOOP,
472         loops::WHILE_LET_ON_ITERATOR,
473         map_clone::MAP_CLONE,
474         matches::MATCH_BOOL,
475         matches::MATCH_OVERLAPPING_ARM,
476         matches::MATCH_REF_PATS,
477         matches::SINGLE_MATCH,
478         methods::CHARS_NEXT_CMP,
479         methods::CLONE_DOUBLE_REF,
480         methods::CLONE_ON_COPY,
481         methods::EXTEND_FROM_SLICE,
482         methods::FILTER_NEXT,
483         methods::NEW_RET_NO_SELF,
484         methods::OK_EXPECT,
485         methods::OPTION_MAP_UNWRAP_OR,
486         methods::OPTION_MAP_UNWRAP_OR_ELSE,
487         methods::OR_FUN_CALL,
488         methods::SEARCH_IS_SOME,
489         methods::SHOULD_IMPLEMENT_TRAIT,
490         methods::SINGLE_CHAR_PATTERN,
491         methods::TEMPORARY_CSTRING_AS_PTR,
492         methods::WRONG_SELF_CONVENTION,
493         minmax::MIN_MAX,
494         misc::CMP_NAN,
495         misc::CMP_OWNED,
496         misc::FLOAT_CMP,
497         misc::MODULO_ONE,
498         misc::REDUNDANT_PATTERN,
499         misc::TOPLEVEL_REF_ARG,
500         misc::USED_UNDERSCORE_BINDING,
501         misc_early::DUPLICATE_UNDERSCORE_ARGUMENT,
502         misc_early::REDUNDANT_CLOSURE_CALL,
503         misc_early::UNNEEDED_FIELD_PATTERN,
504         mut_reference::UNNECESSARY_MUT_PASSED,
505         mutex_atomic::MUTEX_ATOMIC,
506         needless_bool::BOOL_COMPARISON,
507         needless_bool::NEEDLESS_BOOL,
508         needless_borrow::NEEDLESS_BORROW,
509         needless_update::NEEDLESS_UPDATE,
510         neg_multiply::NEG_MULTIPLY,
511         new_without_default::NEW_WITHOUT_DEFAULT,
512         no_effect::NO_EFFECT,
513         non_expressive_names::MANY_SINGLE_CHAR_NAMES,
514         open_options::NONSENSICAL_OPEN_OPTIONS,
515         overflow_check_conditional::OVERFLOW_CHECK_CONDITIONAL,
516         panic::PANIC_PARAMS,
517         precedence::PRECEDENCE,
518         ptr_arg::PTR_ARG,
519         ranges::RANGE_STEP_BY_ZERO,
520         ranges::RANGE_ZIP_WITH_LEN,
521         regex::INVALID_REGEX,
522         regex::REGEX_MACRO,
523         regex::TRIVIAL_REGEX,
524         returns::LET_AND_RETURN,
525         returns::NEEDLESS_RETURN,
526         strings::STRING_LIT_AS_BYTES,
527         swap::ALMOST_SWAPPED,
528         swap::MANUAL_SWAP,
529         temporary_assignment::TEMPORARY_ASSIGNMENT,
530         transmute::CROSSPOINTER_TRANSMUTE,
531         transmute::TRANSMUTE_PTR_TO_REF,
532         transmute::USELESS_TRANSMUTE,
533         types::ABSURD_EXTREME_COMPARISONS,
534         types::BOX_VEC,
535         types::CHAR_LIT_AS_U8,
536         types::INVALID_UPCAST_COMPARISONS,
537         types::LET_UNIT_VALUE,
538         types::LINKEDLIST,
539         types::TYPE_COMPLEXITY,
540         types::UNIT_CMP,
541         unicode::ZERO_WIDTH_SPACE,
542         unsafe_removed_from_name::UNSAFE_REMOVED_FROM_NAME,
543         unused_label::UNUSED_LABEL,
544         vec::USELESS_VEC,
545         zero_div_zero::ZERO_DIVIDED_BY_ZERO,
546     ]);
547 }