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