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