aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ide/src/hover.rs75
-rw-r--r--crates/ide_completion/src/completions/attribute.rs5
-rw-r--r--crates/ide_completion/src/completions/attribute/lint.rs127
-rw-r--r--crates/ide_completion/src/lib.rs2
-rw-r--r--crates/ide_db/src/helpers.rs1
-rw-r--r--crates/ide_db/src/helpers/generated_lints.rs (renamed from crates/ide_completion/src/generated_lint_completions.rs)1645
6 files changed, 1089 insertions, 766 deletions
diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs
index 4d91c5c4f..f3f6f749c 100644
--- a/crates/ide/src/hover.rs
+++ b/crates/ide/src/hover.rs
@@ -3,11 +3,13 @@ use hir::{
3 AsAssocItem, AssocItemContainer, GenericParam, HasAttrs, HasSource, HirDisplay, InFile, Module, 3 AsAssocItem, AssocItemContainer, GenericParam, HasAttrs, HasSource, HirDisplay, InFile, Module,
4 ModuleDef, Semantics, 4 ModuleDef, Semantics,
5}; 5};
6use ide_completion::generated_lint_completions::{CLIPPY_LINTS, FEATURES};
7use ide_db::{ 6use ide_db::{
8 base_db::SourceDatabase, 7 base_db::SourceDatabase,
9 defs::{Definition, NameClass, NameRefClass}, 8 defs::{Definition, NameClass, NameRefClass},
10 helpers::FamousDefs, 9 helpers::{
10 generated_lints::{CLIPPY_LINTS, DEFAULT_LINTS, FEATURES},
11 FamousDefs,
12 },
11 RootDatabase, 13 RootDatabase,
12}; 14};
13use itertools::Itertools; 15use itertools::Itertools;
@@ -206,25 +208,36 @@ fn try_hover_for_attribute(token: &SyntaxToken) -> Option<RangeInfo<HoverResult>
206 if !tt.syntax().text_range().contains(token.text_range().start()) { 208 if !tt.syntax().text_range().contains(token.text_range().start()) {
207 return None; 209 return None;
208 } 210 }
209 let lints = match &*path { 211 let (is_clippy, lints) = match &*path {
210 "feature" => FEATURES, 212 "feature" => (false, FEATURES),
211 "allow" | "warn" | "forbid" | "error" => { 213 "allow" | "deny" | "forbid" | "warn" => {
212 let is_clippy = algo::skip_trivia_token(token.clone(), Direction::Prev) 214 let is_clippy = algo::non_trivia_sibling(token.clone().into(), Direction::Prev)
213 .filter(|t| t.kind() == T![::]) 215 .filter(|t| t.kind() == T![:])
214 .and_then(|t| algo::skip_trivia_token(t, Direction::Prev)) 216 .and_then(|t| algo::non_trivia_sibling(t, Direction::Prev))
215 .map_or(false, |t| t.kind() == T![ident] && t.text() == "clippy"); 217 .filter(|t| t.kind() == T![:])
218 .and_then(|t| algo::non_trivia_sibling(t, Direction::Prev))
219 .map_or(false, |t| {
220 t.kind() == T![ident] && t.into_token().map_or(false, |t| t.text() == "clippy")
221 });
216 if is_clippy { 222 if is_clippy {
217 CLIPPY_LINTS 223 (true, CLIPPY_LINTS)
218 } else { 224 } else {
219 &[] 225 (false, DEFAULT_LINTS)
220 } 226 }
221 } 227 }
222 _ => return None, 228 _ => return None,
223 }; 229 };
224 let lint = lints 230
225 .binary_search_by_key(&token.text(), |lint| lint.label) 231 let tmp;
226 .ok() 232 let needle = if is_clippy {
227 .map(|idx| &FEATURES[idx])?; 233 tmp = format!("clippy::{}", token.text());
234 &tmp
235 } else {
236 &*token.text()
237 };
238
239 let lint =
240 lints.binary_search_by_key(&needle, |lint| lint.label).ok().map(|idx| &lints[idx])?;
228 Some(RangeInfo::new( 241 Some(RangeInfo::new(
229 token.text_range(), 242 token.text_range(),
230 HoverResult { 243 HoverResult {
@@ -4055,4 +4068,36 @@ pub fn foo() {}
4055 "##]], 4068 "##]],
4056 ) 4069 )
4057 } 4070 }
4071
4072 #[test]
4073 fn hover_lint() {
4074 check(
4075 r#"#![allow(arithmetic_overflow$0)]"#,
4076 expect![[r#"
4077 *arithmetic_overflow*
4078 ```
4079 arithmetic_overflow
4080 ```
4081 ___
4082
4083 arithmetic operation overflows
4084 "#]],
4085 )
4086 }
4087
4088 #[test]
4089 fn hover_clippy_lint() {
4090 check(
4091 r#"#![allow(clippy::almost_swapped$0)]"#,
4092 expect![[r#"
4093 *almost_swapped*
4094 ```
4095 clippy::almost_swapped
4096 ```
4097 ___
4098
4099 Checks for `foo = bar; bar = foo` sequences.
4100 "#]],
4101 )
4102 }
4058} 4103}
diff --git a/crates/ide_completion/src/completions/attribute.rs b/crates/ide_completion/src/completions/attribute.rs
index c48bb9e66..f80d7eec3 100644
--- a/crates/ide_completion/src/completions/attribute.rs
+++ b/crates/ide_completion/src/completions/attribute.rs
@@ -3,20 +3,19 @@
3//! This module uses a bit of static metadata to provide completions 3//! This module uses a bit of static metadata to provide completions
4//! for built-in attributes. 4//! for built-in attributes.
5 5
6use ide_db::helpers::generated_lints::{CLIPPY_LINTS, DEFAULT_LINTS, FEATURES};
6use once_cell::sync::Lazy; 7use once_cell::sync::Lazy;
7use rustc_hash::{FxHashMap, FxHashSet}; 8use rustc_hash::{FxHashMap, FxHashSet};
8use syntax::{algo::non_trivia_sibling, ast, AstNode, Direction, NodeOrToken, SyntaxKind, T}; 9use syntax::{algo::non_trivia_sibling, ast, AstNode, Direction, NodeOrToken, SyntaxKind, T};
9 10
10use crate::{ 11use crate::{
11 context::CompletionContext, 12 context::CompletionContext,
12 generated_lint_completions::{CLIPPY_LINTS, FEATURES},
13 item::{CompletionItem, CompletionItemKind, CompletionKind}, 13 item::{CompletionItem, CompletionItemKind, CompletionKind},
14 Completions, 14 Completions,
15}; 15};
16 16
17mod derive; 17mod derive;
18mod lint; 18mod lint;
19pub(crate) use self::lint::LintCompletion;
20 19
21pub(crate) fn complete_attribute(acc: &mut Completions, ctx: &CompletionContext) -> Option<()> { 20pub(crate) fn complete_attribute(acc: &mut Completions, ctx: &CompletionContext) -> Option<()> {
22 let attribute = ctx.attribute_under_caret.as_ref()?; 21 let attribute = ctx.attribute_under_caret.as_ref()?;
@@ -25,7 +24,7 @@ pub(crate) fn complete_attribute(acc: &mut Completions, ctx: &CompletionContext)
25 "derive" => derive::complete_derive(acc, ctx, token_tree), 24 "derive" => derive::complete_derive(acc, ctx, token_tree),
26 "feature" => lint::complete_lint(acc, ctx, token_tree, FEATURES), 25 "feature" => lint::complete_lint(acc, ctx, token_tree, FEATURES),
27 "allow" | "warn" | "deny" | "forbid" => { 26 "allow" | "warn" | "deny" | "forbid" => {
28 lint::complete_lint(acc, ctx, token_tree.clone(), lint::DEFAULT_LINT_COMPLETIONS); 27 lint::complete_lint(acc, ctx, token_tree.clone(), DEFAULT_LINTS);
29 lint::complete_lint(acc, ctx, token_tree, CLIPPY_LINTS); 28 lint::complete_lint(acc, ctx, token_tree, CLIPPY_LINTS);
30 } 29 }
31 _ => (), 30 _ => (),
diff --git a/crates/ide_completion/src/completions/attribute/lint.rs b/crates/ide_completion/src/completions/attribute/lint.rs
index 608e71cec..b486c9093 100644
--- a/crates/ide_completion/src/completions/attribute/lint.rs
+++ b/crates/ide_completion/src/completions/attribute/lint.rs
@@ -1,4 +1,5 @@
1//! Completion for lints 1//! Completion for lints
2use ide_db::helpers::generated_lints::Lint;
2use syntax::ast; 3use syntax::ast;
3 4
4use crate::{ 5use crate::{
@@ -11,7 +12,7 @@ pub(super) fn complete_lint(
11 acc: &mut Completions, 12 acc: &mut Completions,
12 ctx: &CompletionContext, 13 ctx: &CompletionContext,
13 derive_input: ast::TokenTree, 14 derive_input: ast::TokenTree,
14 lints_completions: &[LintCompletion], 15 lints_completions: &[Lint],
15) { 16) {
16 if let Some(existing_lints) = super::parse_comma_sep_input(derive_input) { 17 if let Some(existing_lints) = super::parse_comma_sep_input(derive_input) {
17 for lint_completion in lints_completions 18 for lint_completion in lints_completions
@@ -29,130 +30,6 @@ pub(super) fn complete_lint(
29 } 30 }
30} 31}
31 32
32pub struct LintCompletion {
33 pub label: &'static str,
34 pub description: &'static str,
35}
36
37#[rustfmt::skip]
38pub const DEFAULT_LINT_COMPLETIONS: &[LintCompletion] = &[
39 LintCompletion { label: "absolute_paths_not_starting_with_crate", description: r#"fully qualified paths that start with a module name instead of `crate`, `self`, or an extern crate name"# },
40 LintCompletion { label: "ambiguous_associated_items", description: r#"ambiguous associated items"# },
41 LintCompletion { label: "anonymous_parameters", description: r#"detects anonymous parameters"# },
42 LintCompletion { label: "arithmetic_overflow", description: r#"arithmetic operation overflows"# },
43 LintCompletion { label: "array_into_iter", description: r#"detects calling `into_iter` on arrays"# },
44 LintCompletion { label: "asm_sub_register", description: r#"using only a subset of a register for inline asm inputs"# },
45 LintCompletion { label: "bare_trait_objects", description: r#"suggest using `dyn Trait` for trait objects"# },
46 LintCompletion { label: "bindings_with_variant_name", description: r#"detects pattern bindings with the same name as one of the matched variants"# },
47 LintCompletion { label: "box_pointers", description: r#"use of owned (Box type) heap memory"# },
48 LintCompletion { label: "cenum_impl_drop_cast", description: r#"a C-like enum implementing Drop is cast"# },
49 LintCompletion { label: "clashing_extern_declarations", description: r#"detects when an extern fn has been declared with the same name but different types"# },
50 LintCompletion { label: "coherence_leak_check", description: r#"distinct impls distinguished only by the leak-check code"# },
51 LintCompletion { label: "conflicting_repr_hints", description: r#"conflicts between `#[repr(..)]` hints that were previously accepted and used in practice"# },
52 LintCompletion { label: "confusable_idents", description: r#"detects visually confusable pairs between identifiers"# },
53 LintCompletion { label: "const_err", description: r#"constant evaluation detected erroneous expression"# },
54 LintCompletion { label: "dead_code", description: r#"detect unused, unexported items"# },
55 LintCompletion { label: "deprecated_in_future", description: r#"detects use of items that will be deprecated in a future version"# },
56 LintCompletion { label: "deprecated", description: r#"detects use of deprecated items"# },
57 LintCompletion { label: "elided_lifetimes_in_paths", description: r#"hidden lifetime parameters in types are deprecated"# },
58 LintCompletion { label: "ellipsis_inclusive_range_patterns", description: r#"`...` range patterns are deprecated"# },
59 LintCompletion { label: "explicit_outlives_requirements", description: r#"outlives requirements can be inferred"# },
60 LintCompletion { label: "exported_private_dependencies", description: r#"public interface leaks type from a private dependency"# },
61 LintCompletion { label: "ill_formed_attribute_input", description: r#"ill-formed attribute inputs that were previously accepted and used in practice"# },
62 LintCompletion { label: "illegal_floating_point_literal_pattern", description: r#"floating-point literals cannot be used in patterns"# },
63 LintCompletion { label: "improper_ctypes_definitions", description: r#"proper use of libc types in foreign item definitions"# },
64 LintCompletion { label: "improper_ctypes", description: r#"proper use of libc types in foreign modules"# },
65 LintCompletion { label: "incomplete_features", description: r#"incomplete features that may function improperly in some or all cases"# },
66 LintCompletion { label: "incomplete_include", description: r#"trailing content in included file"# },
67 LintCompletion { label: "indirect_structural_match", description: r#"pattern with const indirectly referencing non-structural-match type"# },
68 LintCompletion { label: "inline_no_sanitize", description: r#"detects incompatible use of `#[inline(always)]` and `#[no_sanitize(...)]`"# },
69 LintCompletion { label: "intra_doc_link_resolution_failure", description: r#"failures in resolving intra-doc link targets"# },
70 LintCompletion { label: "invalid_codeblock_attributes", description: r#"codeblock attribute looks a lot like a known one"# },
71 LintCompletion { label: "invalid_type_param_default", description: r#"type parameter default erroneously allowed in invalid location"# },
72 LintCompletion { label: "invalid_value", description: r#"an invalid value is being created (such as a NULL reference)"# },
73 LintCompletion { label: "irrefutable_let_patterns", description: r#"detects irrefutable patterns in if-let and while-let statements"# },
74 LintCompletion { label: "keyword_idents", description: r#"detects edition keywords being used as an identifier"# },
75 LintCompletion { label: "late_bound_lifetime_arguments", description: r#"detects generic lifetime arguments in path segments with late bound lifetime parameters"# },
76 LintCompletion { label: "macro_expanded_macro_exports_accessed_by_absolute_paths", description: r#"macro-expanded `macro_export` macros from the current crate cannot be referred to by absolute paths"# },
77 LintCompletion { label: "macro_use_extern_crate", description: r#"the `#[macro_use]` attribute is now deprecated in favor of using macros via the module system"# },
78 LintCompletion { label: "meta_variable_misuse", description: r#"possible meta-variable misuse at macro definition"# },
79 LintCompletion { label: "missing_copy_implementations", description: r#"detects potentially-forgotten implementations of `Copy`"# },
80 LintCompletion { label: "missing_crate_level_docs", description: r#"detects crates with no crate-level documentation"# },
81 LintCompletion { label: "missing_debug_implementations", description: r#"detects missing implementations of Debug"# },
82 LintCompletion { label: "missing_doc_code_examples", description: r#"detects publicly-exported items without code samples in their documentation"# },
83 LintCompletion { label: "missing_docs", description: r#"detects missing documentation for public members"# },
84 LintCompletion { label: "missing_fragment_specifier", description: r#"detects missing fragment specifiers in unused `macro_rules!` patterns"# },
85 LintCompletion { label: "mixed_script_confusables", description: r#"detects Unicode scripts whose mixed script confusables codepoints are solely used"# },
86 LintCompletion { label: "mutable_borrow_reservation_conflict", description: r#"reservation of a two-phased borrow conflicts with other shared borrows"# },
87 LintCompletion { label: "mutable_transmutes", description: r#"mutating transmuted &mut T from &T may cause undefined behavior"# },
88 LintCompletion { label: "no_mangle_const_items", description: r#"const items will not have their symbols exported"# },
89 LintCompletion { label: "no_mangle_generic_items", description: r#"generic items must be mangled"# },
90 LintCompletion { label: "non_ascii_idents", description: r#"detects non-ASCII identifiers"# },
91 LintCompletion { label: "non_camel_case_types", description: r#"types, variants, traits and type parameters should have camel case names"# },
92 LintCompletion { label: "non_shorthand_field_patterns", description: r#"using `Struct { x: x }` instead of `Struct { x }` in a pattern"# },
93 LintCompletion { label: "non_snake_case", description: r#"variables, methods, functions, lifetime parameters and modules should have snake case names"# },
94 LintCompletion { label: "non_upper_case_globals", description: r#"static constants should have uppercase identifiers"# },
95 LintCompletion { label: "order_dependent_trait_objects", description: r#"trait-object types were treated as different depending on marker-trait order"# },
96 LintCompletion { label: "overflowing_literals", description: r#"literal out of range for its type"# },
97 LintCompletion { label: "overlapping_patterns", description: r#"detects overlapping patterns"# },
98 LintCompletion { label: "path_statements", description: r#"path statements with no effect"# },
99 LintCompletion { label: "patterns_in_fns_without_body", description: r#"patterns in functions without body were erroneously allowed"# },
100 LintCompletion { label: "private_doc_tests", description: r#"detects code samples in docs of private items not documented by rustdoc"# },
101 LintCompletion { label: "private_in_public", description: r#"detect private items in public interfaces not caught by the old implementation"# },
102 LintCompletion { label: "proc_macro_derive_resolution_fallback", description: r#"detects proc macro derives using inaccessible names from parent modules"# },
103 LintCompletion { label: "pub_use_of_private_extern_crate", description: r#"detect public re-exports of private extern crates"# },
104 LintCompletion { label: "redundant_semicolons", description: r#"detects unnecessary trailing semicolons"# },
105 LintCompletion { label: "renamed_and_removed_lints", description: r#"lints that have been renamed or removed"# },
106 LintCompletion { label: "safe_packed_borrows", description: r#"safe borrows of fields of packed structs were erroneously allowed"# },
107 LintCompletion { label: "single_use_lifetimes", description: r#"detects lifetime parameters that are only used once"# },
108 LintCompletion { label: "soft_unstable", description: r#"a feature gate that doesn't break dependent crates"# },
109 LintCompletion { label: "stable_features", description: r#"stable features found in `#[feature]` directive"# },
110 LintCompletion { label: "trivial_bounds", description: r#"these bounds don't depend on an type parameters"# },
111 LintCompletion { label: "trivial_casts", description: r#"detects trivial casts which could be removed"# },
112 LintCompletion { label: "trivial_numeric_casts", description: r#"detects trivial casts of numeric types which could be removed"# },
113 LintCompletion { label: "type_alias_bounds", description: r#"bounds in type aliases are not enforced"# },
114 LintCompletion { label: "tyvar_behind_raw_pointer", description: r#"raw pointer to an inference variable"# },
115 LintCompletion { label: "unaligned_references", description: r#"detects unaligned references to fields of packed structs"# },
116 LintCompletion { label: "uncommon_codepoints", description: r#"detects uncommon Unicode codepoints in identifiers"# },
117 LintCompletion { label: "unconditional_panic", description: r#"operation will cause a panic at runtime"# },
118 LintCompletion { label: "unconditional_recursion", description: r#"functions that cannot return without calling themselves"# },
119 LintCompletion { label: "unknown_crate_types", description: r#"unknown crate type found in `#[crate_type]` directive"# },
120 LintCompletion { label: "unknown_lints", description: r#"unrecognized lint attribute"# },
121 LintCompletion { label: "unnameable_test_items", description: r#"detects an item that cannot be named being marked as `#[test_case]`"# },
122 LintCompletion { label: "unreachable_code", description: r#"detects unreachable code paths"# },
123 LintCompletion { label: "unreachable_patterns", description: r#"detects unreachable patterns"# },
124 LintCompletion { label: "unreachable_pub", description: r#"`pub` items not reachable from crate root"# },
125 LintCompletion { label: "unsafe_code", description: r#"usage of `unsafe` code"# },
126 LintCompletion { label: "unsafe_op_in_unsafe_fn", description: r#"unsafe operations in unsafe functions without an explicit unsafe block are deprecated"# },
127 LintCompletion { label: "unstable_features", description: r#"enabling unstable features (deprecated. do not use)"# },
128 LintCompletion { label: "unstable_name_collisions", description: r#"detects name collision with an existing but unstable method"# },
129 LintCompletion { label: "unused_allocation", description: r#"detects unnecessary allocations that can be eliminated"# },
130 LintCompletion { label: "unused_assignments", description: r#"detect assignments that will never be read"# },
131 LintCompletion { label: "unused_attributes", description: r#"detects attributes that were not used by the compiler"# },
132 LintCompletion { label: "unused_braces", description: r#"unnecessary braces around an expression"# },
133 LintCompletion { label: "unused_comparisons", description: r#"comparisons made useless by limits of the types involved"# },
134 LintCompletion { label: "unused_crate_dependencies", description: r#"crate dependencies that are never used"# },
135 LintCompletion { label: "unused_doc_comments", description: r#"detects doc comments that aren't used by rustdoc"# },
136 LintCompletion { label: "unused_extern_crates", description: r#"extern crates that are never used"# },
137 LintCompletion { label: "unused_features", description: r#"unused features found in crate-level `#[feature]` directives"# },
138 LintCompletion { label: "unused_import_braces", description: r#"unnecessary braces around an imported item"# },
139 LintCompletion { label: "unused_imports", description: r#"imports that are never used"# },
140 LintCompletion { label: "unused_labels", description: r#"detects labels that are never used"# },
141 LintCompletion { label: "unused_lifetimes", description: r#"detects lifetime parameters that are never used"# },
142 LintCompletion { label: "unused_macros", description: r#"detects macros that were not used"# },
143 LintCompletion { label: "unused_must_use", description: r#"unused result of a type flagged as `#[must_use]`"# },
144 LintCompletion { label: "unused_mut", description: r#"detect mut variables which don't need to be mutable"# },
145 LintCompletion { label: "unused_parens", description: r#"`if`, `match`, `while` and `return` do not need parentheses"# },
146 LintCompletion { label: "unused_qualifications", description: r#"detects unnecessarily qualified names"# },
147 LintCompletion { label: "unused_results", description: r#"unused result of an expression in a statement"# },
148 LintCompletion { label: "unused_unsafe", description: r#"unnecessary use of an `unsafe` block"# },
149 LintCompletion { label: "unused_variables", description: r#"detect variables which are not used in any way"# },
150 LintCompletion { label: "variant_size_differences", description: r#"detects enums with widely varying variant sizes"# },
151 LintCompletion { label: "warnings", description: r#"mass-change the level for lints which produce warnings"# },
152 LintCompletion { label: "where_clauses_object_safety", description: r#"checks the object safety of where clauses"# },
153 LintCompletion { label: "while_true", description: r#"suggest using `loop { }` instead of `while true { }`"# },
154];
155
156#[cfg(test)] 33#[cfg(test)]
157mod tests { 34mod tests {
158 35
diff --git a/crates/ide_completion/src/lib.rs b/crates/ide_completion/src/lib.rs
index 1f0158745..6fb38f50d 100644
--- a/crates/ide_completion/src/lib.rs
+++ b/crates/ide_completion/src/lib.rs
@@ -10,8 +10,6 @@ mod render;
10 10
11mod completions; 11mod completions;
12 12
13pub mod generated_lint_completions;
14
15use completions::flyimport::position_for_import; 13use completions::flyimport::position_for_import;
16use ide_db::{ 14use ide_db::{
17 base_db::FilePosition, 15 base_db::FilePosition,
diff --git a/crates/ide_db/src/helpers.rs b/crates/ide_db/src/helpers.rs
index 21b48237a..00900cdc2 100644
--- a/crates/ide_db/src/helpers.rs
+++ b/crates/ide_db/src/helpers.rs
@@ -3,6 +3,7 @@ pub mod import_assets;
3pub mod insert_use; 3pub mod insert_use;
4pub mod merge_imports; 4pub mod merge_imports;
5pub mod rust_doc; 5pub mod rust_doc;
6pub mod generated_lints;
6 7
7use std::collections::VecDeque; 8use std::collections::VecDeque;
8 9
diff --git a/crates/ide_completion/src/generated_lint_completions.rs b/crates/ide_db/src/helpers/generated_lints.rs
index fe9554526..77021bae0 100644
--- a/crates/ide_completion/src/generated_lint_completions.rs
+++ b/crates/ide_db/src/helpers/generated_lints.rs
@@ -1,9 +1,460 @@
1//! Generated file, do not edit by hand, see `xtask/src/codegen` 1//! Generated file, do not edit by hand, see `xtask/src/codegen`
2 2
3use crate::completions::attribute::LintCompletion; 3pub struct Lint {
4 pub label: &'static str,
5 pub description: &'static str,
6}
7
8pub const DEFAULT_LINTS: &[Lint] = &[
9 Lint { label: "----", description: r##"-------"## },
10 Lint {
11 label: "absolute-paths-not-starting-with-crate",
12 description: r##"fully qualified paths that start with a module name instead of `crate`, `self`, or an extern crate name"##,
13 },
14 Lint { label: "ambiguous-associated-items", description: r##"ambiguous associated items"## },
15 Lint { label: "anonymous-parameters", description: r##"detects anonymous parameters"## },
16 Lint { label: "arithmetic-overflow", description: r##"arithmetic operation overflows"## },
17 Lint { label: "array-into-iter", description: r##"detects calling `into_iter` on arrays"## },
18 Lint {
19 label: "asm-sub-register",
20 description: r##"using only a subset of a register for inline asm inputs"##,
21 },
22 Lint { label: "bad-asm-style", description: r##"incorrect use of inline assembly"## },
23 Lint {
24 label: "bare-trait-objects",
25 description: r##"suggest using `dyn Trait` for trait objects"##,
26 },
27 Lint {
28 label: "bindings-with-variant-name",
29 description: r##"detects pattern bindings with the same name as one of the matched variants"##,
30 },
31 Lint { label: "box-pointers", description: r##"use of owned (Box type) heap memory"## },
32 Lint {
33 label: "cenum-impl-drop-cast",
34 description: r##"a C-like enum implementing Drop is cast"##,
35 },
36 Lint {
37 label: "clashing-extern-declarations",
38 description: r##"detects when an extern fn has been declared with the same name but different types"##,
39 },
40 Lint {
41 label: "coherence-leak-check",
42 description: r##"distinct impls distinguished only by the leak-check code"##,
43 },
44 Lint {
45 label: "conflicting-repr-hints",
46 description: r##"conflicts between `#[repr(..)]` hints that were previously accepted and used in practice"##,
47 },
48 Lint {
49 label: "confusable-idents",
50 description: r##"detects visually confusable pairs between identifiers"##,
51 },
52 Lint {
53 label: "const-err",
54 description: r##"constant evaluation encountered erroneous expression"##,
55 },
56 Lint {
57 label: "const-evaluatable-unchecked",
58 description: r##"detects a generic constant is used in a type without a emitting a warning"##,
59 },
60 Lint {
61 label: "const-item-mutation",
62 description: r##"detects attempts to mutate a `const` item"##,
63 },
64 Lint { label: "dead-code", description: r##"detect unused, unexported items"## },
65 Lint { label: "deprecated", description: r##"detects use of deprecated items"## },
66 Lint {
67 label: "deprecated-in-future",
68 description: r##"detects use of items that will be deprecated in a future version"##,
69 },
70 Lint {
71 label: "deref-nullptr",
72 description: r##"detects when an null pointer is dereferenced"##,
73 },
74 Lint {
75 label: "disjoint-capture-migration",
76 description: r##"Drop reorder and auto traits error because of `capture_disjoint_fields`"##,
77 },
78 Lint { label: "drop-bounds", description: r##"bounds of the form `T: Drop` are useless"## },
79 Lint {
80 label: "elided-lifetimes-in-paths",
81 description: r##"hidden lifetime parameters in types are deprecated"##,
82 },
83 Lint {
84 label: "ellipsis-inclusive-range-patterns",
85 description: r##"`...` range patterns are deprecated"##,
86 },
87 Lint {
88 label: "explicit-outlives-requirements",
89 description: r##"outlives requirements can be inferred"##,
90 },
91 Lint {
92 label: "exported-private-dependencies",
93 description: r##"public interface leaks type from a private dependency"##,
94 },
95 Lint { label: "forbidden-lint-groups", description: r##"applying forbid to lint-groups"## },
96 Lint {
97 label: "function-item-references",
98 description: r##"suggest casting to a function pointer when attempting to take references to function items"##,
99 },
100 Lint {
101 label: "ill-formed-attribute-input",
102 description: r##"ill-formed attribute inputs that were previously accepted and used in practice"##,
103 },
104 Lint {
105 label: "illegal-floating-point-literal-pattern",
106 description: r##"floating-point literals cannot be used in patterns"##,
107 },
108 Lint {
109 label: "improper-ctypes",
110 description: r##"proper use of libc types in foreign modules"##,
111 },
112 Lint {
113 label: "improper-ctypes-definitions",
114 description: r##"proper use of libc types in foreign item definitions"##,
115 },
116 Lint {
117 label: "incomplete-features",
118 description: r##"incomplete features that may function improperly in some or all cases"##,
119 },
120 Lint { label: "incomplete-include", description: r##"trailing content in included file"## },
121 Lint {
122 label: "indirect-structural-match",
123 description: r##"constant used in pattern contains value of non-structural-match type in a field or a variant"##,
124 },
125 Lint {
126 label: "ineffective-unstable-trait-impl",
127 description: r##"detects `#[unstable]` on stable trait implementations for stable types"##,
128 },
129 Lint {
130 label: "inline-no-sanitize",
131 description: r##"detects incompatible use of `#[inline(always)]` and `#[no_sanitize(...)]`"##,
132 },
133 Lint {
134 label: "invalid-type-param-default",
135 description: r##"type parameter default erroneously allowed in invalid location"##,
136 },
137 Lint {
138 label: "invalid-value",
139 description: r##"an invalid value is being created (such as a null reference)"##,
140 },
141 Lint {
142 label: "irrefutable-let-patterns",
143 description: r##"detects irrefutable patterns in `if let` and `while let` statements"##,
144 },
145 Lint {
146 label: "keyword-idents",
147 description: r##"detects edition keywords being used as an identifier"##,
148 },
149 Lint { label: "large-assignments", description: r##"detects large moves or copies"## },
150 Lint {
151 label: "late-bound-lifetime-arguments",
152 description: r##"detects generic lifetime arguments in path segments with late bound lifetime parameters"##,
153 },
154 Lint {
155 label: "legacy-derive-helpers",
156 description: r##"detects derive helper attributes that are used before they are introduced"##,
157 },
158 Lint {
159 label: "macro-expanded-macro-exports-accessed-by-absolute-paths",
160 description: r##"macro-expanded `macro_export` macros from the current crate cannot be referred to by absolute paths"##,
161 },
162 Lint {
163 label: "macro-use-extern-crate",
164 description: r##"the `#[macro_use]` attribute is now deprecated in favor of using macros via the module system"##,
165 },
166 Lint {
167 label: "meta-variable-misuse",
168 description: r##"possible meta-variable misuse at macro definition"##,
169 },
170 Lint { label: "missing-abi", description: r##"No declared ABI for extern declaration"## },
171 Lint {
172 label: "missing-copy-implementations",
173 description: r##"detects potentially-forgotten implementations of `Copy`"##,
174 },
175 Lint {
176 label: "missing-debug-implementations",
177 description: r##"detects missing implementations of Debug"##,
178 },
179 Lint {
180 label: "missing-docs",
181 description: r##"detects missing documentation for public members"##,
182 },
183 Lint {
184 label: "missing-fragment-specifier",
185 description: r##"detects missing fragment specifiers in unused `macro_rules!` patterns"##,
186 },
187 Lint {
188 label: "mixed-script-confusables",
189 description: r##"detects Unicode scripts whose mixed script confusables codepoints are solely used"##,
190 },
191 Lint {
192 label: "mutable-borrow-reservation-conflict",
193 description: r##"reservation of a two-phased borrow conflicts with other shared borrows"##,
194 },
195 Lint {
196 label: "mutable-transmutes",
197 description: r##"mutating transmuted &mut T from &T may cause undefined behavior"##,
198 },
199 Lint {
200 label: "no-mangle-const-items",
201 description: r##"const items will not have their symbols exported"##,
202 },
203 Lint { label: "no-mangle-generic-items", description: r##"generic items must be mangled"## },
204 Lint { label: "non-ascii-idents", description: r##"detects non-ASCII identifiers"## },
205 Lint {
206 label: "non-camel-case-types",
207 description: r##"types, variants, traits and type parameters should have camel case names"##,
208 },
209 Lint {
210 label: "non-fmt-panic",
211 description: r##"detect single-argument panic!() invocations in which the argument is not a format string"##,
212 },
213 Lint {
214 label: "non-shorthand-field-patterns",
215 description: r##"using `Struct { x: x }` instead of `Struct { x }` in a pattern"##,
216 },
217 Lint {
218 label: "non-snake-case",
219 description: r##"variables, methods, functions, lifetime parameters and modules should have snake case names"##,
220 },
221 Lint {
222 label: "non-upper-case-globals",
223 description: r##"static constants should have uppercase identifiers"##,
224 },
225 Lint {
226 label: "nontrivial-structural-match",
227 description: r##"constant used in pattern of non-structural-match type and the constant's initializer expression contains values of non-structural-match types"##,
228 },
229 Lint {
230 label: "noop-method-call",
231 description: r##"detects the use of well-known noop methods"##,
232 },
233 Lint {
234 label: "or-patterns-back-compat",
235 description: r##"detects usage of old versions of or-patterns"##,
236 },
237 Lint {
238 label: "order-dependent-trait-objects",
239 description: r##"trait-object types were treated as different depending on marker-trait order"##,
240 },
241 Lint { label: "overflowing-literals", description: r##"literal out of range for its type"## },
242 Lint {
243 label: "overlapping-range-endpoints",
244 description: r##"detects range patterns with overlapping endpoints"##,
245 },
246 Lint { label: "path-statements", description: r##"path statements with no effect"## },
247 Lint {
248 label: "patterns-in-fns-without-body",
249 description: r##"patterns in functions without body were erroneously allowed"##,
250 },
251 Lint {
252 label: "pointer-structural-match",
253 description: r##"pointers are not structural-match"##,
254 },
255 Lint {
256 label: "private-in-public",
257 description: r##"detect private items in public interfaces not caught by the old implementation"##,
258 },
259 Lint {
260 label: "proc-macro-back-compat",
261 description: r##"detects usage of old versions of certain proc-macro crates"##,
262 },
263 Lint {
264 label: "proc-macro-derive-resolution-fallback",
265 description: r##"detects proc macro derives using inaccessible names from parent modules"##,
266 },
267 Lint {
268 label: "pub-use-of-private-extern-crate",
269 description: r##"detect public re-exports of private extern crates"##,
270 },
271 Lint {
272 label: "redundant-semicolons",
273 description: r##"detects unnecessary trailing semicolons"##,
274 },
275 Lint {
276 label: "renamed-and-removed-lints",
277 description: r##"lints that have been renamed or removed"##,
278 },
279 Lint {
280 label: "semicolon-in-expressions-from-macros",
281 description: r##"trailing semicolon in macro body used as expression"##,
282 },
283 Lint {
284 label: "single-use-lifetimes",
285 description: r##"detects lifetime parameters that are only used once"##,
286 },
287 Lint {
288 label: "soft-unstable",
289 description: r##"a feature gate that doesn't break dependent crates"##,
290 },
291 Lint {
292 label: "stable-features",
293 description: r##"stable features found in `#[feature]` directive"##,
294 },
295 Lint {
296 label: "temporary-cstring-as-ptr",
297 description: r##"detects getting the inner pointer of a temporary `CString`"##,
298 },
299 Lint {
300 label: "trivial-bounds",
301 description: r##"these bounds don't depend on an type parameters"##,
302 },
303 Lint {
304 label: "trivial-casts",
305 description: r##"detects trivial casts which could be removed"##,
306 },
307 Lint {
308 label: "trivial-numeric-casts",
309 description: r##"detects trivial casts of numeric types which could be removed"##,
310 },
311 Lint {
312 label: "type-alias-bounds",
313 description: r##"bounds in type aliases are not enforced"##,
314 },
315 Lint {
316 label: "tyvar-behind-raw-pointer",
317 description: r##"raw pointer to an inference variable"##,
318 },
319 Lint {
320 label: "unaligned-references",
321 description: r##"detects unaligned references to fields of packed structs"##,
322 },
323 Lint {
324 label: "uncommon-codepoints",
325 description: r##"detects uncommon Unicode codepoints in identifiers"##,
326 },
327 Lint {
328 label: "unconditional-panic",
329 description: r##"operation will cause a panic at runtime"##,
330 },
331 Lint {
332 label: "unconditional-recursion",
333 description: r##"functions that cannot return without calling themselves"##,
334 },
335 Lint { label: "uninhabited-static", description: r##"uninhabited static"## },
336 Lint {
337 label: "unknown-crate-types",
338 description: r##"unknown crate type found in `#[crate_type]` directive"##,
339 },
340 Lint { label: "unknown-lints", description: r##"unrecognized lint attribute"## },
341 Lint {
342 label: "unnameable-test-items",
343 description: r##"detects an item that cannot be named being marked as `#[test_case]`"##,
344 },
345 Lint { label: "unreachable-code", description: r##"detects unreachable code paths"## },
346 Lint { label: "unreachable-patterns", description: r##"detects unreachable patterns"## },
347 Lint {
348 label: "unreachable-pub",
349 description: r##"`pub` items not reachable from crate root"##,
350 },
351 Lint { label: "unsafe-code", description: r##"usage of `unsafe` code"## },
352 Lint {
353 label: "unsafe-op-in-unsafe-fn",
354 description: r##"unsafe operations in unsafe functions without an explicit unsafe block are deprecated"##,
355 },
356 Lint {
357 label: "unstable-features",
358 description: r##"enabling unstable features (deprecated. do not use)"##,
359 },
360 Lint {
361 label: "unstable-name-collisions",
362 description: r##"detects name collision with an existing but unstable method"##,
363 },
364 Lint {
365 label: "unsupported-naked-functions",
366 description: r##"unsupported naked function definitions"##,
367 },
368 Lint {
369 label: "unused-allocation",
370 description: r##"detects unnecessary allocations that can be eliminated"##,
371 },
372 Lint {
373 label: "unused-assignments",
374 description: r##"detect assignments that will never be read"##,
375 },
376 Lint {
377 label: "unused-attributes",
378 description: r##"detects attributes that were not used by the compiler"##,
379 },
380 Lint { label: "unused-braces", description: r##"unnecessary braces around an expression"## },
381 Lint {
382 label: "unused-comparisons",
383 description: r##"comparisons made useless by limits of the types involved"##,
384 },
385 Lint {
386 label: "unused-crate-dependencies",
387 description: r##"crate dependencies that are never used"##,
388 },
389 Lint {
390 label: "unused-doc-comments",
391 description: r##"detects doc comments that aren't used by rustdoc"##,
392 },
393 Lint { label: "unused-extern-crates", description: r##"extern crates that are never used"## },
394 Lint {
395 label: "unused-features",
396 description: r##"unused features found in crate-level `#[feature]` directives"##,
397 },
398 Lint {
399 label: "unused-import-braces",
400 description: r##"unnecessary braces around an imported item"##,
401 },
402 Lint { label: "unused-imports", description: r##"imports that are never used"## },
403 Lint { label: "unused-labels", description: r##"detects labels that are never used"## },
404 Lint {
405 label: "unused-lifetimes",
406 description: r##"detects lifetime parameters that are never used"##,
407 },
408 Lint { label: "unused-macros", description: r##"detects macros that were not used"## },
409 Lint {
410 label: "unused-must-use",
411 description: r##"unused result of a type flagged as `#[must_use]`"##,
412 },
413 Lint {
414 label: "unused-mut",
415 description: r##"detect mut variables which don't need to be mutable"##,
416 },
417 Lint {
418 label: "unused-parens",
419 description: r##"`if`, `match`, `while` and `return` do not need parentheses"##,
420 },
421 Lint {
422 label: "unused-qualifications",
423 description: r##"detects unnecessarily qualified names"##,
424 },
425 Lint {
426 label: "unused-results",
427 description: r##"unused result of an expression in a statement"##,
428 },
429 Lint { label: "unused-unsafe", description: r##"unnecessary use of an `unsafe` block"## },
430 Lint {
431 label: "unused-variables",
432 description: r##"detect variables which are not used in any way"##,
433 },
434 Lint {
435 label: "useless-deprecated",
436 description: r##"detects deprecation attributes with no effect"##,
437 },
438 Lint {
439 label: "variant-size-differences",
440 description: r##"detects enums with widely varying variant sizes"##,
441 },
442 Lint {
443 label: "warnings",
444 description: r##"mass-change the level for lints which produce warnings"##,
445 },
446 Lint {
447 label: "where-clauses-object-safety",
448 description: r##"checks the object safety of where clauses"##,
449 },
450 Lint {
451 label: "while-true",
452 description: r##"suggest using `loop { }` instead of `while true { }`"##,
453 },
454];
4 455
5pub const FEATURES: &[LintCompletion] = &[ 456pub const FEATURES: &[Lint] = &[
6 LintCompletion { 457 Lint {
7 label: "abi_c_cmse_nonsecure_call", 458 label: "abi_c_cmse_nonsecure_call",
8 description: r##"# `abi_c_cmse_nonsecure_call` 459 description: r##"# `abi_c_cmse_nonsecure_call`
9 460
@@ -95,7 +546,7 @@ call_nonsecure_function:
95``` 546```
96"##, 547"##,
97 }, 548 },
98 LintCompletion { 549 Lint {
99 label: "abi_msp430_interrupt", 550 label: "abi_msp430_interrupt",
100 description: r##"# `abi_msp430_interrupt` 551 description: r##"# `abi_msp430_interrupt`
101 552
@@ -141,7 +592,7 @@ Disassembly of section .text:
141``` 592```
142"##, 593"##,
143 }, 594 },
144 LintCompletion { 595 Lint {
145 label: "abi_ptx", 596 label: "abi_ptx",
146 description: r##"# `abi_ptx` 597 description: r##"# `abi_ptx`
147 598
@@ -205,7 +656,7 @@ $ cat $(find -name '*.s')
205``` 656```
206"##, 657"##,
207 }, 658 },
208 LintCompletion { 659 Lint {
209 label: "abi_thiscall", 660 label: "abi_thiscall",
210 description: r##"# `abi_thiscall` 661 description: r##"# `abi_thiscall`
211 662
@@ -221,7 +672,7 @@ convention on x86 Windows except that the first parameter of the method,
221the `this` pointer, is passed in the ECX register. 672the `this` pointer, is passed in the ECX register.
222"##, 673"##,
223 }, 674 },
224 LintCompletion { 675 Lint {
225 label: "allocator_api", 676 label: "allocator_api",
226 description: r##"# `allocator_api` 677 description: r##"# `allocator_api`
227 678
@@ -240,7 +691,7 @@ for which you want a custom allocator.
240TBD 691TBD
241"##, 692"##,
242 }, 693 },
243 LintCompletion { 694 Lint {
244 label: "allocator_internals", 695 label: "allocator_internals",
245 description: r##"# `allocator_internals` 696 description: r##"# `allocator_internals`
246 697
@@ -251,7 +702,7 @@ compiler.
251------------------------ 702------------------------
252"##, 703"##,
253 }, 704 },
254 LintCompletion { 705 Lint {
255 label: "arbitrary_enum_discriminant", 706 label: "arbitrary_enum_discriminant",
256 description: r##"# `arbitrary_enum_discriminant` 707 description: r##"# `arbitrary_enum_discriminant`
257 708
@@ -292,7 +743,7 @@ assert_eq!(1, Enum::Struct{a: 7, b: 11}.tag());
292``` 743```
293"##, 744"##,
294 }, 745 },
295 LintCompletion { 746 Lint {
296 label: "asm", 747 label: "asm",
297 description: r##"# `asm` 748 description: r##"# `asm`
298 749
@@ -1134,7 +1585,7 @@ The compiler performs some additional checks on options:
1134> **Note**: As a general rule, the flags covered by `preserves_flags` are those which are *not* preserved when performing a function call. 1585> **Note**: As a general rule, the flags covered by `preserves_flags` are those which are *not* preserved when performing a function call.
1135"##, 1586"##,
1136 }, 1587 },
1137 LintCompletion { 1588 Lint {
1138 label: "auto_traits", 1589 label: "auto_traits",
1139 description: r##"# `auto_traits` 1590 description: r##"# `auto_traits`
1140 1591
@@ -1244,7 +1695,7 @@ Auto traits cannot have any trait items, such as methods or associated types. Th
1244Auto traits cannot have supertraits. This is for soundness reasons, as the interaction of coinduction with implied bounds is difficult to reconcile. 1695Auto traits cannot have supertraits. This is for soundness reasons, as the interaction of coinduction with implied bounds is difficult to reconcile.
1245"##, 1696"##,
1246 }, 1697 },
1247 LintCompletion { 1698 Lint {
1248 label: "box_patterns", 1699 label: "box_patterns",
1249 description: r##"# `box_patterns` 1700 description: r##"# `box_patterns`
1250 1701
@@ -1280,7 +1731,7 @@ fn main() {
1280``` 1731```
1281"##, 1732"##,
1282 }, 1733 },
1283 LintCompletion { 1734 Lint {
1284 label: "box_syntax", 1735 label: "box_syntax",
1285 description: r##"# `box_syntax` 1736 description: r##"# `box_syntax`
1286 1737
@@ -1306,7 +1757,7 @@ fn main() {
1306``` 1757```
1307"##, 1758"##,
1308 }, 1759 },
1309 LintCompletion { 1760 Lint {
1310 label: "c_unwind", 1761 label: "c_unwind",
1311 description: r##"# `c_unwind` 1762 description: r##"# `c_unwind`
1312 1763
@@ -1325,7 +1776,7 @@ See [RFC 2945] for more information.
1325[RFC 2945]: https://github.com/rust-lang/rfcs/blob/master/text/2945-c-unwind-abi.md 1776[RFC 2945]: https://github.com/rust-lang/rfcs/blob/master/text/2945-c-unwind-abi.md
1326"##, 1777"##,
1327 }, 1778 },
1328 LintCompletion { 1779 Lint {
1329 label: "c_variadic", 1780 label: "c_variadic",
1330 description: r##"# `c_variadic` 1781 description: r##"# `c_variadic`
1331 1782
@@ -1353,7 +1804,7 @@ pub unsafe extern "C" fn add(n: usize, mut args: ...) -> usize {
1353``` 1804```
1354"##, 1805"##,
1355 }, 1806 },
1356 LintCompletion { 1807 Lint {
1357 label: "c_variadic", 1808 label: "c_variadic",
1358 description: r##"# `c_variadic` 1809 description: r##"# `c_variadic`
1359 1810
@@ -1383,7 +1834,7 @@ pub unsafe extern "C" fn vadd(n: usize, mut args: VaList) -> usize {
1383``` 1834```
1384"##, 1835"##,
1385 }, 1836 },
1386 LintCompletion { 1837 Lint {
1387 label: "c_void_variant", 1838 label: "c_void_variant",
1388 description: r##"# `c_void_variant` 1839 description: r##"# `c_void_variant`
1389 1840
@@ -1392,7 +1843,7 @@ This feature is internal to the Rust compiler and is not intended for general us
1392------------------------ 1843------------------------
1393"##, 1844"##,
1394 }, 1845 },
1395 LintCompletion { 1846 Lint {
1396 label: "cfg_panic", 1847 label: "cfg_panic",
1397 description: r##"# `cfg_panic` 1848 description: r##"# `cfg_panic`
1398 1849
@@ -1434,7 +1885,7 @@ fn b() {
1434``` 1885```
1435"##, 1886"##,
1436 }, 1887 },
1437 LintCompletion { 1888 Lint {
1438 label: "cfg_sanitize", 1889 label: "cfg_sanitize",
1439 description: r##"# `cfg_sanitize` 1890 description: r##"# `cfg_sanitize`
1440 1891
@@ -1472,7 +1923,7 @@ fn b() {
1472``` 1923```
1473"##, 1924"##,
1474 }, 1925 },
1475 LintCompletion { 1926 Lint {
1476 label: "cfg_version", 1927 label: "cfg_version",
1477 description: r##"# `cfg_version` 1928 description: r##"# `cfg_version`
1478 1929
@@ -1511,7 +1962,7 @@ fn b() {
1511``` 1962```
1512"##, 1963"##,
1513 }, 1964 },
1514 LintCompletion { 1965 Lint {
1515 label: "char_error_internals", 1966 label: "char_error_internals",
1516 description: r##"# `char_error_internals` 1967 description: r##"# `char_error_internals`
1517 1968
@@ -1520,7 +1971,7 @@ This feature is internal to the Rust compiler and is not intended for general us
1520------------------------ 1971------------------------
1521"##, 1972"##,
1522 }, 1973 },
1523 LintCompletion { 1974 Lint {
1524 label: "cmse_nonsecure_entry", 1975 label: "cmse_nonsecure_entry",
1525 description: r##"# `cmse_nonsecure_entry` 1976 description: r##"# `cmse_nonsecure_entry`
1526 1977
@@ -1605,7 +2056,7 @@ $ arm-none-eabi-objdump -D function.o
1605``` 2056```
1606"##, 2057"##,
1607 }, 2058 },
1608 LintCompletion { 2059 Lint {
1609 label: "compiler_builtins", 2060 label: "compiler_builtins",
1610 description: r##"# `compiler_builtins` 2061 description: r##"# `compiler_builtins`
1611 2062
@@ -1614,7 +2065,7 @@ This feature is internal to the Rust compiler and is not intended for general us
1614------------------------ 2065------------------------
1615"##, 2066"##,
1616 }, 2067 },
1617 LintCompletion { 2068 Lint {
1618 label: "concat_idents", 2069 label: "concat_idents",
1619 description: r##"# `concat_idents` 2070 description: r##"# `concat_idents`
1620 2071
@@ -1640,7 +2091,7 @@ fn main() {
1640``` 2091```
1641"##, 2092"##,
1642 }, 2093 },
1643 LintCompletion { 2094 Lint {
1644 label: "const_eval_limit", 2095 label: "const_eval_limit",
1645 description: r##"# `const_eval_limit` 2096 description: r##"# `const_eval_limit`
1646 2097
@@ -1651,7 +2102,7 @@ The tracking issue for this feature is: [#67217]
1651The `const_eval_limit` allows someone to limit the evaluation steps the CTFE undertakes to evaluate a `const fn`. 2102The `const_eval_limit` allows someone to limit the evaluation steps the CTFE undertakes to evaluate a `const fn`.
1652"##, 2103"##,
1653 }, 2104 },
1654 LintCompletion { 2105 Lint {
1655 label: "core_intrinsics", 2106 label: "core_intrinsics",
1656 description: r##"# `core_intrinsics` 2107 description: r##"# `core_intrinsics`
1657 2108
@@ -1660,7 +2111,7 @@ This feature is internal to the Rust compiler and is not intended for general us
1660------------------------ 2111------------------------
1661"##, 2112"##,
1662 }, 2113 },
1663 LintCompletion { 2114 Lint {
1664 label: "core_panic", 2115 label: "core_panic",
1665 description: r##"# `core_panic` 2116 description: r##"# `core_panic`
1666 2117
@@ -1669,7 +2120,7 @@ This feature is internal to the Rust compiler and is not intended for general us
1669------------------------ 2120------------------------
1670"##, 2121"##,
1671 }, 2122 },
1672 LintCompletion { 2123 Lint {
1673 label: "core_private_bignum", 2124 label: "core_private_bignum",
1674 description: r##"# `core_private_bignum` 2125 description: r##"# `core_private_bignum`
1675 2126
@@ -1678,7 +2129,7 @@ This feature is internal to the Rust compiler and is not intended for general us
1678------------------------ 2129------------------------
1679"##, 2130"##,
1680 }, 2131 },
1681 LintCompletion { 2132 Lint {
1682 label: "core_private_diy_float", 2133 label: "core_private_diy_float",
1683 description: r##"# `core_private_diy_float` 2134 description: r##"# `core_private_diy_float`
1684 2135
@@ -1687,7 +2138,7 @@ This feature is internal to the Rust compiler and is not intended for general us
1687------------------------ 2138------------------------
1688"##, 2139"##,
1689 }, 2140 },
1690 LintCompletion { 2141 Lint {
1691 label: "crate_visibility_modifier", 2142 label: "crate_visibility_modifier",
1692 description: r##"# `crate_visibility_modifier` 2143 description: r##"# `crate_visibility_modifier`
1693 2144
@@ -1711,7 +2162,7 @@ crate struct Foo {
1711``` 2162```
1712"##, 2163"##,
1713 }, 2164 },
1714 LintCompletion { 2165 Lint {
1715 label: "custom_test_frameworks", 2166 label: "custom_test_frameworks",
1716 description: r##"# `custom_test_frameworks` 2167 description: r##"# `custom_test_frameworks`
1717 2168
@@ -1747,7 +2198,7 @@ const WILL_FAIL: i32 = 4;
1747``` 2198```
1748"##, 2199"##,
1749 }, 2200 },
1750 LintCompletion { 2201 Lint {
1751 label: "dec2flt", 2202 label: "dec2flt",
1752 description: r##"# `dec2flt` 2203 description: r##"# `dec2flt`
1753 2204
@@ -1756,7 +2207,7 @@ This feature is internal to the Rust compiler and is not intended for general us
1756------------------------ 2207------------------------
1757"##, 2208"##,
1758 }, 2209 },
1759 LintCompletion { 2210 Lint {
1760 label: "default_free_fn", 2211 label: "default_free_fn",
1761 description: r##"# `default_free_fn` 2212 description: r##"# `default_free_fn`
1762 2213
@@ -1807,7 +2258,7 @@ fn main() {
1807``` 2258```
1808"##, 2259"##,
1809 }, 2260 },
1810 LintCompletion { 2261 Lint {
1811 label: "derive_clone_copy", 2262 label: "derive_clone_copy",
1812 description: r##"# `derive_clone_copy` 2263 description: r##"# `derive_clone_copy`
1813 2264
@@ -1816,7 +2267,7 @@ This feature is internal to the Rust compiler and is not intended for general us
1816------------------------ 2267------------------------
1817"##, 2268"##,
1818 }, 2269 },
1819 LintCompletion { 2270 Lint {
1820 label: "derive_eq", 2271 label: "derive_eq",
1821 description: r##"# `derive_eq` 2272 description: r##"# `derive_eq`
1822 2273
@@ -1825,7 +2276,7 @@ This feature is internal to the Rust compiler and is not intended for general us
1825------------------------ 2276------------------------
1826"##, 2277"##,
1827 }, 2278 },
1828 LintCompletion { 2279 Lint {
1829 label: "doc_cfg", 2280 label: "doc_cfg",
1830 description: r##"# `doc_cfg` 2281 description: r##"# `doc_cfg`
1831 2282
@@ -1875,7 +2326,7 @@ pub struct Icon {
1875[#43348]: https://github.com/rust-lang/rust/issues/43348 2326[#43348]: https://github.com/rust-lang/rust/issues/43348
1876"##, 2327"##,
1877 }, 2328 },
1878 LintCompletion { 2329 Lint {
1879 label: "doc_masked", 2330 label: "doc_masked",
1880 description: r##"# `doc_masked` 2331 description: r##"# `doc_masked`
1881 2332
@@ -1903,7 +2354,7 @@ Such types would introduce broken links into the documentation.
1903[#44027]: https://github.com/rust-lang/rust/pull/44027 2354[#44027]: https://github.com/rust-lang/rust/pull/44027
1904"##, 2355"##,
1905 }, 2356 },
1906 LintCompletion { 2357 Lint {
1907 label: "doc_notable_trait", 2358 label: "doc_notable_trait",
1908 description: r##"# `doc_notable_trait` 2359 description: r##"# `doc_notable_trait`
1909 2360
@@ -1940,7 +2391,7 @@ See also its documentation in [the rustdoc book][rustdoc-book-notable_trait].
1940[rustdoc-book-notable_trait]: ../../rustdoc/unstable-features.html#adding-your-trait-to-the-notable-traits-dialog 2391[rustdoc-book-notable_trait]: ../../rustdoc/unstable-features.html#adding-your-trait-to-the-notable-traits-dialog
1941"##, 2392"##,
1942 }, 2393 },
1943 LintCompletion { 2394 Lint {
1944 label: "external_doc", 2395 label: "external_doc",
1945 description: r##"# `external_doc` 2396 description: r##"# `external_doc`
1946 2397
@@ -1984,7 +2435,7 @@ This feature was proposed in [RFC #1990] and initially implemented in PR [#44781
1984[#44781]: https://github.com/rust-lang/rust/pull/44781 2435[#44781]: https://github.com/rust-lang/rust/pull/44781
1985"##, 2436"##,
1986 }, 2437 },
1987 LintCompletion { 2438 Lint {
1988 label: "fd", 2439 label: "fd",
1989 description: r##"# `fd` 2440 description: r##"# `fd`
1990 2441
@@ -1993,7 +2444,7 @@ This feature is internal to the Rust compiler and is not intended for general us
1993------------------------ 2444------------------------
1994"##, 2445"##,
1995 }, 2446 },
1996 LintCompletion { 2447 Lint {
1997 label: "fd_read", 2448 label: "fd_read",
1998 description: r##"# `fd_read` 2449 description: r##"# `fd_read`
1999 2450
@@ -2002,7 +2453,7 @@ This feature is internal to the Rust compiler and is not intended for general us
2002------------------------ 2453------------------------
2003"##, 2454"##,
2004 }, 2455 },
2005 LintCompletion { 2456 Lint {
2006 label: "ffi_const", 2457 label: "ffi_const",
2007 description: r##"# `ffi_const` 2458 description: r##"# `ffi_const`
2008 2459
@@ -2058,7 +2509,7 @@ against are compatible with those of the `#[ffi_const]`.
2058[IBM ILE C/C++]: https://www.ibm.com/support/knowledgecenter/fr/ssw_ibm_i_71/rzarg/fn_attrib_const.htm 2509[IBM ILE C/C++]: https://www.ibm.com/support/knowledgecenter/fr/ssw_ibm_i_71/rzarg/fn_attrib_const.htm
2059"##, 2510"##,
2060 }, 2511 },
2061 LintCompletion { 2512 Lint {
2062 label: "ffi_pure", 2513 label: "ffi_pure",
2063 description: r##"# `ffi_pure` 2514 description: r##"# `ffi_pure`
2064 2515
@@ -2118,7 +2569,7 @@ against are compatible with those of the `#[ffi_pure]`.
2118[IBM ILE C/C++]: https://www.ibm.com/support/knowledgecenter/fr/ssw_ibm_i_71/rzarg/fn_attrib_pure.htm 2569[IBM ILE C/C++]: https://www.ibm.com/support/knowledgecenter/fr/ssw_ibm_i_71/rzarg/fn_attrib_pure.htm
2119"##, 2570"##,
2120 }, 2571 },
2121 LintCompletion { 2572 Lint {
2122 label: "flt2dec", 2573 label: "flt2dec",
2123 description: r##"# `flt2dec` 2574 description: r##"# `flt2dec`
2124 2575
@@ -2127,7 +2578,7 @@ This feature is internal to the Rust compiler and is not intended for general us
2127------------------------ 2578------------------------
2128"##, 2579"##,
2129 }, 2580 },
2130 LintCompletion { 2581 Lint {
2131 label: "fmt_internals", 2582 label: "fmt_internals",
2132 description: r##"# `fmt_internals` 2583 description: r##"# `fmt_internals`
2133 2584
@@ -2136,7 +2587,7 @@ This feature is internal to the Rust compiler and is not intended for general us
2136------------------------ 2587------------------------
2137"##, 2588"##,
2138 }, 2589 },
2139 LintCompletion { 2590 Lint {
2140 label: "fn_traits", 2591 label: "fn_traits",
2141 description: r##"# `fn_traits` 2592 description: r##"# `fn_traits`
2142 2593
@@ -2175,7 +2626,7 @@ fn main() {
2175``` 2626```
2176"##, 2627"##,
2177 }, 2628 },
2178 LintCompletion { 2629 Lint {
2179 label: "format_args_capture", 2630 label: "format_args_capture",
2180 description: r##"# `format_args_capture` 2631 description: r##"# `format_args_capture`
2181 2632
@@ -2226,7 +2677,7 @@ A non-exhaustive list of macros which benefit from this functionality include:
2226- macros in many thirdparty crates, such as `log` 2677- macros in many thirdparty crates, such as `log`
2227"##, 2678"##,
2228 }, 2679 },
2229 LintCompletion { 2680 Lint {
2230 label: "generators", 2681 label: "generators",
2231 description: r##"# `generators` 2682 description: r##"# `generators`
2232 2683
@@ -2476,7 +2927,7 @@ is just a rough desugaring, not a normative specification for what the compiler
2476does. 2927does.
2477"##, 2928"##,
2478 }, 2929 },
2479 LintCompletion { 2930 Lint {
2480 label: "global_asm", 2931 label: "global_asm",
2481 description: r##"# `global_asm` 2932 description: r##"# `global_asm`
2482 2933
@@ -2593,7 +3044,7 @@ assembly to `fn` bodies only, you might try the
2593[asm](asm.md) feature instead. 3044[asm](asm.md) feature instead.
2594"##, 3045"##,
2595 }, 3046 },
2596 LintCompletion { 3047 Lint {
2597 label: "impl_trait_in_bindings", 3048 label: "impl_trait_in_bindings",
2598 description: r##"# `impl_trait_in_bindings` 3049 description: r##"# `impl_trait_in_bindings`
2599 3050
@@ -2625,7 +3076,7 @@ example, calling inherent methods or methods outside of the specified traits
2625(e.g., `a.abs()` or `b.abs()`) is not allowed, and yields an error. 3076(e.g., `a.abs()` or `b.abs()`) is not allowed, and yields an error.
2626"##, 3077"##,
2627 }, 3078 },
2628 LintCompletion { 3079 Lint {
2629 label: "infer_static_outlives_requirements", 3080 label: "infer_static_outlives_requirements",
2630 description: r##"# `infer_static_outlives_requirements` 3081 description: r##"# `infer_static_outlives_requirements`
2631 3082
@@ -2673,7 +3124,7 @@ struct Bar<T: 'static> {
2673``` 3124```
2674"##, 3125"##,
2675 }, 3126 },
2676 LintCompletion { 3127 Lint {
2677 label: "inline_const", 3128 label: "inline_const",
2678 description: r##"# `inline_const` 3129 description: r##"# `inline_const`
2679 3130
@@ -2722,7 +3173,7 @@ match some_int {
2722[#76001]: https://github.com/rust-lang/rust/issues/76001 3173[#76001]: https://github.com/rust-lang/rust/issues/76001
2723"##, 3174"##,
2724 }, 3175 },
2725 LintCompletion { 3176 Lint {
2726 label: "int_error_internals", 3177 label: "int_error_internals",
2727 description: r##"# `int_error_internals` 3178 description: r##"# `int_error_internals`
2728 3179
@@ -2731,7 +3182,7 @@ This feature is internal to the Rust compiler and is not intended for general us
2731------------------------ 3182------------------------
2732"##, 3183"##,
2733 }, 3184 },
2734 LintCompletion { 3185 Lint {
2735 label: "internal_output_capture", 3186 label: "internal_output_capture",
2736 description: r##"# `internal_output_capture` 3187 description: r##"# `internal_output_capture`
2737 3188
@@ -2740,7 +3191,7 @@ This feature is internal to the Rust compiler and is not intended for general us
2740------------------------ 3191------------------------
2741"##, 3192"##,
2742 }, 3193 },
2743 LintCompletion { 3194 Lint {
2744 label: "intra_doc_pointers", 3195 label: "intra_doc_pointers",
2745 description: r##"# `intra-doc-pointers` 3196 description: r##"# `intra-doc-pointers`
2746 3197
@@ -2759,7 +3210,7 @@ raw pointers in intra-doc links are unstable until it does.
2759``` 3210```
2760"##, 3211"##,
2761 }, 3212 },
2762 LintCompletion { 3213 Lint {
2763 label: "intrinsics", 3214 label: "intrinsics",
2764 description: r##"# `intrinsics` 3215 description: r##"# `intrinsics`
2765 3216
@@ -2792,7 +3243,7 @@ extern "rust-intrinsic" {
2792As with any other FFI functions, these are always `unsafe` to call. 3243As with any other FFI functions, these are always `unsafe` to call.
2793"##, 3244"##,
2794 }, 3245 },
2795 LintCompletion { 3246 Lint {
2796 label: "is_sorted", 3247 label: "is_sorted",
2797 description: r##"# `is_sorted` 3248 description: r##"# `is_sorted`
2798 3249
@@ -2807,7 +3258,7 @@ add the methods `is_sorted`, `is_sorted_by` and `is_sorted_by_key` to
2807`Iterator`. 3258`Iterator`.
2808"##, 3259"##,
2809 }, 3260 },
2810 LintCompletion { 3261 Lint {
2811 label: "lang_items", 3262 label: "lang_items",
2812 description: r##"# `lang_items` 3263 description: r##"# `lang_items`
2813 3264
@@ -3106,7 +3557,7 @@ the source code.
3106 - `rc`: `liballoc/rc.rs` 3557 - `rc`: `liballoc/rc.rs`
3107"##, 3558"##,
3108 }, 3559 },
3109 LintCompletion { 3560 Lint {
3110 label: "libstd_sys_internals", 3561 label: "libstd_sys_internals",
3111 description: r##"# `libstd_sys_internals` 3562 description: r##"# `libstd_sys_internals`
3112 3563
@@ -3115,7 +3566,7 @@ This feature is internal to the Rust compiler and is not intended for general us
3115------------------------ 3566------------------------
3116"##, 3567"##,
3117 }, 3568 },
3118 LintCompletion { 3569 Lint {
3119 label: "libstd_thread_internals", 3570 label: "libstd_thread_internals",
3120 description: r##"# `libstd_thread_internals` 3571 description: r##"# `libstd_thread_internals`
3121 3572
@@ -3124,7 +3575,7 @@ This feature is internal to the Rust compiler and is not intended for general us
3124------------------------ 3575------------------------
3125"##, 3576"##,
3126 }, 3577 },
3127 LintCompletion { 3578 Lint {
3128 label: "link_cfg", 3579 label: "link_cfg",
3129 description: r##"# `link_cfg` 3580 description: r##"# `link_cfg`
3130 3581
@@ -3133,7 +3584,7 @@ This feature is internal to the Rust compiler and is not intended for general us
3133------------------------ 3584------------------------
3134"##, 3585"##,
3135 }, 3586 },
3136 LintCompletion { 3587 Lint {
3137 label: "llvm_asm", 3588 label: "llvm_asm",
3138 description: r##"# `llvm_asm` 3589 description: r##"# `llvm_asm`
3139 3590
@@ -3330,7 +3781,7 @@ If you need more power and don't mind losing some of the niceties of
3330`llvm_asm!`, check out [global_asm](global-asm.md). 3781`llvm_asm!`, check out [global_asm](global-asm.md).
3331"##, 3782"##,
3332 }, 3783 },
3333 LintCompletion { 3784 Lint {
3334 label: "marker_trait_attr", 3785 label: "marker_trait_attr",
3335 description: r##"# `marker_trait_attr` 3786 description: r##"# `marker_trait_attr`
3336 3787
@@ -3369,7 +3820,7 @@ This is expected to replace the unstable `overlapping_marker_traits`
3369feature, which applied to all empty traits (without needing an opt-in). 3820feature, which applied to all empty traits (without needing an opt-in).
3370"##, 3821"##,
3371 }, 3822 },
3372 LintCompletion { 3823 Lint {
3373 label: "native_link_modifiers", 3824 label: "native_link_modifiers",
3374 description: r##"# `native_link_modifiers` 3825 description: r##"# `native_link_modifiers`
3375 3826
@@ -3384,7 +3835,7 @@ The `native_link_modifiers` feature allows you to use the `modifiers` syntax wit
3384Modifiers are specified as a comma-delimited string with each modifier prefixed with either a `+` or `-` to indicate that the modifier is enabled or disabled, respectively. The last boolean value specified for a given modifier wins. 3835Modifiers are specified as a comma-delimited string with each modifier prefixed with either a `+` or `-` to indicate that the modifier is enabled or disabled, respectively. The last boolean value specified for a given modifier wins.
3385"##, 3836"##,
3386 }, 3837 },
3387 LintCompletion { 3838 Lint {
3388 label: "native_link_modifiers_as_needed", 3839 label: "native_link_modifiers_as_needed",
3389 description: r##"# `native_link_modifiers_as_needed` 3840 description: r##"# `native_link_modifiers_as_needed`
3390 3841
@@ -3406,7 +3857,7 @@ The modifier does nothing for linkers that don't support it (e.g. `link.exe`).
3406The default for this modifier is unclear, some targets currently specify it as `+as-needed`, some do not. We may want to try making `+as-needed` a default for all targets. 3857The default for this modifier is unclear, some targets currently specify it as `+as-needed`, some do not. We may want to try making `+as-needed` a default for all targets.
3407"##, 3858"##,
3408 }, 3859 },
3409 LintCompletion { 3860 Lint {
3410 label: "native_link_modifiers_bundle", 3861 label: "native_link_modifiers_bundle",
3411 description: r##"# `native_link_modifiers_bundle` 3862 description: r##"# `native_link_modifiers_bundle`
3412 3863
@@ -3429,7 +3880,7 @@ This modifier is supposed to supersede the `static-nobundle` linking kind define
3429The default for this modifier is currently `+bundle`, but it could be changed later on some future edition boundary. 3880The default for this modifier is currently `+bundle`, but it could be changed later on some future edition boundary.
3430"##, 3881"##,
3431 }, 3882 },
3432 LintCompletion { 3883 Lint {
3433 label: "native_link_modifiers_verbatim", 3884 label: "native_link_modifiers_verbatim",
3434 description: r##"# `native_link_modifiers_verbatim` 3885 description: r##"# `native_link_modifiers_verbatim`
3435 3886
@@ -3453,7 +3904,7 @@ This RFC changes the behavior of `raw-dylib` linking kind specified by [RFC 2627
3453If your DLL doesn't have the `.dll` suffix, it can be specified with `+verbatim`. 3904If your DLL doesn't have the `.dll` suffix, it can be specified with `+verbatim`.
3454"##, 3905"##,
3455 }, 3906 },
3456 LintCompletion { 3907 Lint {
3457 label: "native_link_modifiers_whole_archive", 3908 label: "native_link_modifiers_whole_archive",
3458 description: r##"# `native_link_modifiers_whole_archive` 3909 description: r##"# `native_link_modifiers_whole_archive`
3459 3910
@@ -3475,7 +3926,7 @@ The modifier does nothing for linkers that don't support it.
3475The default for this modifier is `-whole-archive`. 3926The default for this modifier is `-whole-archive`.
3476"##, 3927"##,
3477 }, 3928 },
3478 LintCompletion { 3929 Lint {
3479 label: "negative_impls", 3930 label: "negative_impls",
3480 description: r##"# `negative_impls` 3931 description: r##"# `negative_impls`
3481 3932
@@ -3536,7 +3987,7 @@ This serves two purposes:
3536* It prevents downstream crates from creating such impls. 3987* It prevents downstream crates from creating such impls.
3537"##, 3988"##,
3538 }, 3989 },
3539 LintCompletion { 3990 Lint {
3540 label: "no_coverage", 3991 label: "no_coverage",
3541 description: r##"# `no_coverage` 3992 description: r##"# `no_coverage`
3542 3993
@@ -3570,7 +4021,7 @@ fn bar() {
3570``` 4021```
3571"##, 4022"##,
3572 }, 4023 },
3573 LintCompletion { 4024 Lint {
3574 label: "no_sanitize", 4025 label: "no_sanitize",
3575 description: r##"# `no_sanitize` 4026 description: r##"# `no_sanitize`
3576 4027
@@ -3603,7 +4054,7 @@ fn foo() {
3603``` 4054```
3604"##, 4055"##,
3605 }, 4056 },
3606 LintCompletion { 4057 Lint {
3607 label: "plugin", 4058 label: "plugin",
3608 description: r##"# `plugin` 4059 description: r##"# `plugin`
3609 4060
@@ -3726,7 +4177,7 @@ You can run `rustc -W help foo.rs` to see a list of lints known to `rustc`,
3726including those provided by plugins loaded by `foo.rs`. 4177including those provided by plugins loaded by `foo.rs`.
3727"##, 4178"##,
3728 }, 4179 },
3729 LintCompletion { 4180 Lint {
3730 label: "plugin_registrar", 4181 label: "plugin_registrar",
3731 description: r##"# `plugin_registrar` 4182 description: r##"# `plugin_registrar`
3732 4183
@@ -3743,7 +4194,7 @@ their docs.
3743------------------------ 4194------------------------
3744"##, 4195"##,
3745 }, 4196 },
3746 LintCompletion { 4197 Lint {
3747 label: "print_internals", 4198 label: "print_internals",
3748 description: r##"# `print_internals` 4199 description: r##"# `print_internals`
3749 4200
@@ -3752,7 +4203,7 @@ This feature is internal to the Rust compiler and is not intended for general us
3752------------------------ 4203------------------------
3753"##, 4204"##,
3754 }, 4205 },
3755 LintCompletion { 4206 Lint {
3756 label: "profiler_runtime", 4207 label: "profiler_runtime",
3757 description: r##"# `profiler_runtime` 4208 description: r##"# `profiler_runtime`
3758 4209
@@ -3761,7 +4212,7 @@ The tracking issue for this feature is: [#42524](https://github.com/rust-lang/ru
3761------------------------ 4212------------------------
3762"##, 4213"##,
3763 }, 4214 },
3764 LintCompletion { 4215 Lint {
3765 label: "profiler_runtime_lib", 4216 label: "profiler_runtime_lib",
3766 description: r##"# `profiler_runtime_lib` 4217 description: r##"# `profiler_runtime_lib`
3767 4218
@@ -3770,7 +4221,7 @@ This feature is internal to the Rust compiler and is not intended for general us
3770------------------------ 4221------------------------
3771"##, 4222"##,
3772 }, 4223 },
3773 LintCompletion { 4224 Lint {
3774 label: "repr128", 4225 label: "repr128",
3775 description: r##"# `repr128` 4226 description: r##"# `repr128`
3776 4227
@@ -3792,7 +4243,7 @@ enum Foo {
3792``` 4243```
3793"##, 4244"##,
3794 }, 4245 },
3795 LintCompletion { 4246 Lint {
3796 label: "rt", 4247 label: "rt",
3797 description: r##"# `rt` 4248 description: r##"# `rt`
3798 4249
@@ -3801,7 +4252,7 @@ This feature is internal to the Rust compiler and is not intended for general us
3801------------------------ 4252------------------------
3802"##, 4253"##,
3803 }, 4254 },
3804 LintCompletion { 4255 Lint {
3805 label: "rustc_attrs", 4256 label: "rustc_attrs",
3806 description: r##"# `rustc_attrs` 4257 description: r##"# `rustc_attrs`
3807 4258
@@ -3858,7 +4309,7 @@ error: aborting due to 2 previous errors
3858``` 4309```
3859"##, 4310"##,
3860 }, 4311 },
3861 LintCompletion { 4312 Lint {
3862 label: "sort_internals", 4313 label: "sort_internals",
3863 description: r##"# `sort_internals` 4314 description: r##"# `sort_internals`
3864 4315
@@ -3867,7 +4318,7 @@ This feature is internal to the Rust compiler and is not intended for general us
3867------------------------ 4318------------------------
3868"##, 4319"##,
3869 }, 4320 },
3870 LintCompletion { 4321 Lint {
3871 label: "str_internals", 4322 label: "str_internals",
3872 description: r##"# `str_internals` 4323 description: r##"# `str_internals`
3873 4324
@@ -3876,7 +4327,7 @@ This feature is internal to the Rust compiler and is not intended for general us
3876------------------------ 4327------------------------
3877"##, 4328"##,
3878 }, 4329 },
3879 LintCompletion { 4330 Lint {
3880 label: "test", 4331 label: "test",
3881 description: r##"# `test` 4332 description: r##"# `test`
3882 4333
@@ -4038,7 +4489,7 @@ However, the optimizer can still modify a testcase in an undesirable manner
4038even when using either of the above. 4489even when using either of the above.
4039"##, 4490"##,
4040 }, 4491 },
4041 LintCompletion { 4492 Lint {
4042 label: "thread_local_internals", 4493 label: "thread_local_internals",
4043 description: r##"# `thread_local_internals` 4494 description: r##"# `thread_local_internals`
4044 4495
@@ -4047,7 +4498,7 @@ This feature is internal to the Rust compiler and is not intended for general us
4047------------------------ 4498------------------------
4048"##, 4499"##,
4049 }, 4500 },
4050 LintCompletion { 4501 Lint {
4051 label: "trace_macros", 4502 label: "trace_macros",
4052 description: r##"# `trace_macros` 4503 description: r##"# `trace_macros`
4053 4504
@@ -4090,7 +4541,7 @@ note: trace_macro
4090``` 4541```
4091"##, 4542"##,
4092 }, 4543 },
4093 LintCompletion { 4544 Lint {
4094 label: "trait_alias", 4545 label: "trait_alias",
4095 description: r##"# `trait_alias` 4546 description: r##"# `trait_alias`
4096 4547
@@ -4128,7 +4579,7 @@ pub fn main() {
4128``` 4579```
4129"##, 4580"##,
4130 }, 4581 },
4131 LintCompletion { 4582 Lint {
4132 label: "transparent_unions", 4583 label: "transparent_unions",
4133 description: r##"# `transparent_unions` 4584 description: r##"# `transparent_unions`
4134 4585
@@ -4215,7 +4666,7 @@ possible, but is not required to, and different compiler versions may differ in
4215their application of these optimizations. 4666their application of these optimizations.
4216"##, 4667"##,
4217 }, 4668 },
4218 LintCompletion { 4669 Lint {
4219 label: "try_blocks", 4670 label: "try_blocks",
4220 description: r##"# `try_blocks` 4671 description: r##"# `try_blocks`
4221 4672
@@ -4249,7 +4700,7 @@ assert!(result.is_err());
4249``` 4700```
4250"##, 4701"##,
4251 }, 4702 },
4252 LintCompletion { 4703 Lint {
4253 label: "try_trait", 4704 label: "try_trait",
4254 description: r##"# `try_trait` 4705 description: r##"# `try_trait`
4255 4706
@@ -4303,7 +4754,7 @@ function (or catch block). Having a distinct error type (as opposed to
4303just `()`, or similar) restricts this to where it's semantically meaningful. 4754just `()`, or similar) restricts this to where it's semantically meaningful.
4304"##, 4755"##,
4305 }, 4756 },
4306 LintCompletion { 4757 Lint {
4307 label: "unboxed_closures", 4758 label: "unboxed_closures",
4308 description: r##"# `unboxed_closures` 4759 description: r##"# `unboxed_closures`
4309 4760
@@ -4332,7 +4783,7 @@ fn main() {}
4332``` 4783```
4333"##, 4784"##,
4334 }, 4785 },
4335 LintCompletion { 4786 Lint {
4336 label: "unsized_locals", 4787 label: "unsized_locals",
4337 description: r##"# `unsized_locals` 4788 description: r##"# `unsized_locals`
4338 4789
@@ -4511,7 +4962,7 @@ fn main() {
4511will unnecessarily extend the stack frame. 4962will unnecessarily extend the stack frame.
4512"##, 4963"##,
4513 }, 4964 },
4514 LintCompletion { 4965 Lint {
4515 label: "unsized_tuple_coercion", 4966 label: "unsized_tuple_coercion",
4516 description: r##"# `unsized_tuple_coercion` 4967 description: r##"# `unsized_tuple_coercion`
4517 4968
@@ -4542,7 +4993,7 @@ fn main() {
4542[RFC0401]: https://github.com/rust-lang/rfcs/blob/master/text/0401-coercions.md 4993[RFC0401]: https://github.com/rust-lang/rfcs/blob/master/text/0401-coercions.md
4543"##, 4994"##,
4544 }, 4995 },
4545 LintCompletion { 4996 Lint {
4546 label: "update_panic_count", 4997 label: "update_panic_count",
4547 description: r##"# `update_panic_count` 4998 description: r##"# `update_panic_count`
4548 4999
@@ -4551,7 +5002,7 @@ This feature is internal to the Rust compiler and is not intended for general us
4551------------------------ 5002------------------------
4552"##, 5003"##,
4553 }, 5004 },
4554 LintCompletion { 5005 Lint {
4555 label: "windows_c", 5006 label: "windows_c",
4556 description: r##"# `windows_c` 5007 description: r##"# `windows_c`
4557 5008
@@ -4560,7 +5011,7 @@ This feature is internal to the Rust compiler and is not intended for general us
4560------------------------ 5011------------------------
4561"##, 5012"##,
4562 }, 5013 },
4563 LintCompletion { 5014 Lint {
4564 label: "windows_handle", 5015 label: "windows_handle",
4565 description: r##"# `windows_handle` 5016 description: r##"# `windows_handle`
4566 5017
@@ -4569,7 +5020,7 @@ This feature is internal to the Rust compiler and is not intended for general us
4569------------------------ 5020------------------------
4570"##, 5021"##,
4571 }, 5022 },
4572 LintCompletion { 5023 Lint {
4573 label: "windows_net", 5024 label: "windows_net",
4574 description: r##"# `windows_net` 5025 description: r##"# `windows_net`
4575 5026
@@ -4578,7 +5029,7 @@ This feature is internal to the Rust compiler and is not intended for general us
4578------------------------ 5029------------------------
4579"##, 5030"##,
4580 }, 5031 },
4581 LintCompletion { 5032 Lint {
4582 label: "windows_stdio", 5033 label: "windows_stdio",
4583 description: r##"# `windows_stdio` 5034 description: r##"# `windows_stdio`
4584 5035
@@ -4589,1899 +5040,1851 @@ This feature is internal to the Rust compiler and is not intended for general us
4589 }, 5040 },
4590]; 5041];
4591 5042
4592pub const CLIPPY_LINTS: &[LintCompletion] = &[ 5043pub const CLIPPY_LINTS: &[Lint] = &[
4593 LintCompletion { 5044 Lint {
4594 label: "clippy::absurd_extreme_comparisons", 5045 label: "clippy::absurd_extreme_comparisons",
4595 description: r##"Checks for comparisons where one side of the relation is\neither the minimum or maximum value for its type and warns if it involves a\ncase that is always true or always false. Only integer and boolean types are\nchecked."##, 5046 description: r##"Checks for comparisons where one side of the relation is\neither the minimum or maximum value for its type and warns if it involves a\ncase that is always true or always false. Only integer and boolean types are\nchecked."##,
4596 }, 5047 },
4597 LintCompletion { 5048 Lint {
4598 label: "clippy::almost_swapped", 5049 label: "clippy::almost_swapped",
4599 description: r##"Checks for `foo = bar; bar = foo` sequences."##, 5050 description: r##"Checks for `foo = bar; bar = foo` sequences."##,
4600 }, 5051 },
4601 LintCompletion { 5052 Lint {
4602 label: "clippy::approx_constant", 5053 label: "clippy::approx_constant",
4603 description: r##"Checks for floating point literals that approximate\nconstants which are defined in\n[`std::f32::consts`](https://doc.rust-lang.org/stable/std/f32/consts/#constants)\nor\n[`std::f64::consts`](https://doc.rust-lang.org/stable/std/f64/consts/#constants),\nrespectively, suggesting to use the predefined constant."##, 5054 description: r##"Checks for floating point literals that approximate\nconstants which are defined in\n[`std::f32::consts`](https://doc.rust-lang.org/stable/std/f32/consts/#constants)\nor\n[`std::f64::consts`](https://doc.rust-lang.org/stable/std/f64/consts/#constants),\nrespectively, suggesting to use the predefined constant."##,
4604 }, 5055 },
4605 LintCompletion { 5056 Lint {
4606 label: "clippy::as_conversions", 5057 label: "clippy::as_conversions",
4607 description: r##"Checks for usage of `as` conversions.\n\nNote that this lint is specialized in linting *every single* use of `as`\nregardless of whether good alternatives exist or not.\nIf you want more precise lints for `as`, please consider using these separate lints:\n`unnecessary_cast`, `cast_lossless/possible_truncation/possible_wrap/precision_loss/sign_loss`,\n`fn_to_numeric_cast(_with_truncation)`, `char_lit_as_u8`, `ref_to_mut` and `ptr_as_ptr`.\nThere is a good explanation the reason why this lint should work in this way and how it is useful\n[in this issue](https://github.com/rust-lang/rust-clippy/issues/5122)."##, 5058 description: r##"Checks for usage of `as` conversions.\n\nNote that this lint is specialized in linting *every single* use of `as`\nregardless of whether good alternatives exist or not.\nIf you want more precise lints for `as`, please consider using these separate lints:\n`unnecessary_cast`, `cast_lossless/possible_truncation/possible_wrap/precision_loss/sign_loss`,\n`fn_to_numeric_cast(_with_truncation)`, `char_lit_as_u8`, `ref_to_mut` and `ptr_as_ptr`.\nThere is a good explanation the reason why this lint should work in this way and how it is useful\n[in this issue](https://github.com/rust-lang/rust-clippy/issues/5122)."##,
4608 }, 5059 },
4609 LintCompletion { 5060 Lint {
4610 label: "clippy::assertions_on_constants", 5061 label: "clippy::assertions_on_constants",
4611 description: r##"Checks for `assert!(true)` and `assert!(false)` calls."##, 5062 description: r##"Checks for `assert!(true)` and `assert!(false)` calls."##,
4612 }, 5063 },
4613 LintCompletion { 5064 Lint {
4614 label: "clippy::assign_op_pattern", 5065 label: "clippy::assign_op_pattern",
4615 description: r##"Checks for `a = a op b` or `a = b commutative_op a`\npatterns."##, 5066 description: r##"Checks for `a = a op b` or `a = b commutative_op a`\npatterns."##,
4616 }, 5067 },
4617 LintCompletion { 5068 Lint {
4618 label: "clippy::assign_ops", 5069 label: "clippy::assign_ops",
4619 description: r##"Nothing. This lint has been deprecated."##, 5070 description: r##"Nothing. This lint has been deprecated."##,
4620 }, 5071 },
4621 LintCompletion { 5072 Lint {
4622 label: "clippy::async_yields_async", 5073 label: "clippy::async_yields_async",
4623 description: r##"Checks for async blocks that yield values of types\nthat can themselves be awaited."##, 5074 description: r##"Checks for async blocks that yield values of types\nthat can themselves be awaited."##,
4624 }, 5075 },
4625 LintCompletion { 5076 Lint {
4626 label: "clippy::await_holding_lock", 5077 label: "clippy::await_holding_lock",
4627 description: r##"Checks for calls to await while holding a\nnon-async-aware MutexGuard."##, 5078 description: r##"Checks for calls to await while holding a\nnon-async-aware MutexGuard."##,
4628 }, 5079 },
4629 LintCompletion { 5080 Lint {
4630 label: "clippy::await_holding_refcell_ref", 5081 label: "clippy::await_holding_refcell_ref",
4631 description: r##"Checks for calls to await while holding a\n`RefCell` `Ref` or `RefMut`."##, 5082 description: r##"Checks for calls to await while holding a\n`RefCell` `Ref` or `RefMut`."##,
4632 }, 5083 },
4633 LintCompletion { 5084 Lint {
4634 label: "clippy::bad_bit_mask", 5085 label: "clippy::bad_bit_mask",
4635 description: r##"Checks for incompatible bit masks in comparisons.\n\nThe formula for detecting if an expression of the type `_ <bit_op> m\n<cmp_op> c` (where `<bit_op>` is one of {`&`, `|`} and `<cmp_op>` is one of\n{`!=`, `>=`, `>`, `!=`, `>=`, `>`}) can be determined from the following\ntable:\n\n|Comparison |Bit Op|Example |is always|Formula |\n|------------|------|------------|---------|----------------------|\n|`==` or `!=`| `&` |`x & 2 == 3`|`false` |`c & m != c` |\n|`<` or `>=`| `&` |`x & 2 < 3` |`true` |`m < c` |\n|`>` or `<=`| `&` |`x & 1 > 1` |`false` |`m <= c` |\n|`==` or `!=`| `|` |`x | 1 == 0`|`false` |`c | m != c` |\n|`<` or `>=`| `|` |`x | 1 < 1` |`false` |`m >= c` |\n|`<=` or `>` | `|` |`x | 1 > 0` |`true` |`m > c` |"##, 5086 description: r##"Checks for incompatible bit masks in comparisons.\n\nThe formula for detecting if an expression of the type `_ <bit_op> m\n<cmp_op> c` (where `<bit_op>` is one of {`&`, `|`} and `<cmp_op>` is one of\n{`!=`, `>=`, `>`, `!=`, `>=`, `>`}) can be determined from the following\ntable:\n\n|Comparison |Bit Op|Example |is always|Formula |\n|------------|------|------------|---------|----------------------|\n|`==` or `!=`| `&` |`x & 2 == 3`|`false` |`c & m != c` |\n|`<` or `>=`| `&` |`x & 2 < 3` |`true` |`m < c` |\n|`>` or `<=`| `&` |`x & 1 > 1` |`false` |`m <= c` |\n|`==` or `!=`| `|` |`x | 1 == 0`|`false` |`c | m != c` |\n|`<` or `>=`| `|` |`x | 1 < 1` |`false` |`m >= c` |\n|`<=` or `>` | `|` |`x | 1 > 0` |`true` |`m > c` |"##,
4636 }, 5087 },
4637 LintCompletion { 5088 Lint {
4638 label: "clippy::bind_instead_of_map", 5089 label: "clippy::bind_instead_of_map",
4639 description: r##"Checks for usage of `_.and_then(|x| Some(y))`, `_.and_then(|x| Ok(y))` or\n`_.or_else(|x| Err(y))`."##, 5090 description: r##"Checks for usage of `_.and_then(|x| Some(y))`, `_.and_then(|x| Ok(y))` or\n`_.or_else(|x| Err(y))`."##,
4640 }, 5091 },
4641 LintCompletion { 5092 Lint {
4642 label: "clippy::blacklisted_name", 5093 label: "clippy::blacklisted_name",
4643 description: r##"Checks for usage of blacklisted names for variables, such\nas `foo`."##, 5094 description: r##"Checks for usage of blacklisted names for variables, such\nas `foo`."##,
4644 }, 5095 },
4645 LintCompletion { 5096 Lint {
4646 label: "clippy::blanket_clippy_restriction_lints", 5097 label: "clippy::blanket_clippy_restriction_lints",
4647 description: r##"Checks for `warn`/`deny`/`forbid` attributes targeting the whole clippy::restriction category."##, 5098 description: r##"Checks for `warn`/`deny`/`forbid` attributes targeting the whole clippy::restriction category."##,
4648 }, 5099 },
4649 LintCompletion { 5100 Lint {
4650 label: "clippy::blocks_in_if_conditions", 5101 label: "clippy::blocks_in_if_conditions",
4651 description: r##"Checks for `if` conditions that use blocks containing an\nexpression, statements or conditions that use closures with blocks."##, 5102 description: r##"Checks for `if` conditions that use blocks containing an\nexpression, statements or conditions that use closures with blocks."##,
4652 }, 5103 },
4653 LintCompletion { 5104 Lint {
4654 label: "clippy::bool_assert_comparison", 5105 label: "clippy::bool_assert_comparison",
4655 description: r##"This lint warns about boolean comparisons in assert-like macros."##, 5106 description: r##"This lint warns about boolean comparisons in assert-like macros."##,
4656 }, 5107 },
4657 LintCompletion { 5108 Lint {
4658 label: "clippy::bool_comparison", 5109 label: "clippy::bool_comparison",
4659 description: r##"Checks for expressions of the form `x == true`,\n`x != true` and order comparisons such as `x < true` (or vice versa) and\nsuggest using the variable directly."##, 5110 description: r##"Checks for expressions of the form `x == true`,\n`x != true` and order comparisons such as `x < true` (or vice versa) and\nsuggest using the variable directly."##,
4660 }, 5111 },
4661 LintCompletion { 5112 Lint {
4662 label: "clippy::borrow_interior_mutable_const", 5113 label: "clippy::borrow_interior_mutable_const",
4663 description: r##"Checks if `const` items which is interior mutable (e.g.,\ncontains a `Cell`, `Mutex`, `AtomicXxxx`, etc.) has been borrowed directly."##, 5114 description: r##"Checks if `const` items which is interior mutable (e.g.,\ncontains a `Cell`, `Mutex`, `AtomicXxxx`, etc.) has been borrowed directly."##,
4664 }, 5115 },
4665 LintCompletion { 5116 Lint {
4666 label: "clippy::borrowed_box", 5117 label: "clippy::borrowed_box",
4667 description: r##"Checks for use of `&Box<T>` anywhere in the code.\nCheck the [Box documentation](https://doc.rust-lang.org/std/boxed/index.html) for more information."##, 5118 description: r##"Checks for use of `&Box<T>` anywhere in the code.\nCheck the [Box documentation](https://doc.rust-lang.org/std/boxed/index.html) for more information."##,
4668 }, 5119 },
4669 LintCompletion { 5120 Lint {
4670 label: "clippy::box_vec", 5121 label: "clippy::box_vec",
4671 description: r##"Checks for use of `Box<Vec<_>>` anywhere in the code.\nCheck the [Box documentation](https://doc.rust-lang.org/std/boxed/index.html) for more information."##, 5122 description: r##"Checks for use of `Box<Vec<_>>` anywhere in the code.\nCheck the [Box documentation](https://doc.rust-lang.org/std/boxed/index.html) for more information."##,
4672 }, 5123 },
4673 LintCompletion { 5124 Lint {
4674 label: "clippy::boxed_local", 5125 label: "clippy::boxed_local",
4675 description: r##"Checks for usage of `Box<T>` where an unboxed `T` would\nwork fine."##, 5126 description: r##"Checks for usage of `Box<T>` where an unboxed `T` would\nwork fine."##,
4676 }, 5127 },
4677 LintCompletion { 5128 Lint {
4678 label: "clippy::branches_sharing_code", 5129 label: "clippy::branches_sharing_code",
4679 description: r##"Checks if the `if` and `else` block contain shared code that can be\nmoved out of the blocks."##, 5130 description: r##"Checks if the `if` and `else` block contain shared code that can be\nmoved out of the blocks."##,
4680 }, 5131 },
4681 LintCompletion { 5132 Lint {
4682 label: "clippy::builtin_type_shadow", 5133 label: "clippy::builtin_type_shadow",
4683 description: r##"Warns if a generic shadows a built-in type."##, 5134 description: r##"Warns if a generic shadows a built-in type."##,
4684 }, 5135 },
4685 LintCompletion { 5136 Lint {
4686 label: "clippy::bytes_nth", 5137 label: "clippy::bytes_nth",
4687 description: r##"Checks for the use of `.bytes().nth()`."##, 5138 description: r##"Checks for the use of `.bytes().nth()`."##,
4688 }, 5139 },
4689 LintCompletion { 5140 Lint {
4690 label: "clippy::cargo_common_metadata", 5141 label: "clippy::cargo_common_metadata",
4691 description: r##"Checks to see if all common metadata is defined in\n`Cargo.toml`. See: https://rust-lang-nursery.github.io/api-guidelines/documentation.html#cargotoml-includes-all-common-metadata-c-metadata"##, 5142 description: r##"Checks to see if all common metadata is defined in\n`Cargo.toml`. See: https://rust-lang-nursery.github.io/api-guidelines/documentation.html#cargotoml-includes-all-common-metadata-c-metadata"##,
4692 }, 5143 },
4693 LintCompletion { 5144 Lint {
4694 label: "clippy::case_sensitive_file_extension_comparisons", 5145 label: "clippy::case_sensitive_file_extension_comparisons",
4695 description: r##"Checks for calls to `ends_with` with possible file extensions\nand suggests to use a case-insensitive approach instead."##, 5146 description: r##"Checks for calls to `ends_with` with possible file extensions\nand suggests to use a case-insensitive approach instead."##,
4696 }, 5147 },
4697 LintCompletion { 5148 Lint {
4698 label: "clippy::cast_lossless", 5149 label: "clippy::cast_lossless",
4699 description: r##"Checks for casts between numerical types that may\nbe replaced by safe conversion functions."##, 5150 description: r##"Checks for casts between numerical types that may\nbe replaced by safe conversion functions."##,
4700 }, 5151 },
4701 LintCompletion { 5152 Lint {
4702 label: "clippy::cast_possible_truncation", 5153 label: "clippy::cast_possible_truncation",
4703 description: r##"Checks for casts between numerical types that may\ntruncate large values. This is expected behavior, so the cast is `Allow` by\ndefault."##, 5154 description: r##"Checks for casts between numerical types that may\ntruncate large values. This is expected behavior, so the cast is `Allow` by\ndefault."##,
4704 }, 5155 },
4705 LintCompletion { 5156 Lint {
4706 label: "clippy::cast_possible_wrap", 5157 label: "clippy::cast_possible_wrap",
4707 description: r##"Checks for casts from an unsigned type to a signed type of\nthe same size. Performing such a cast is a 'no-op' for the compiler,\ni.e., nothing is changed at the bit level, and the binary representation of\nthe value is reinterpreted. This can cause wrapping if the value is too big\nfor the target signed type. However, the cast works as defined, so this lint\nis `Allow` by default."##, 5158 description: r##"Checks for casts from an unsigned type to a signed type of\nthe same size. Performing such a cast is a 'no-op' for the compiler,\ni.e., nothing is changed at the bit level, and the binary representation of\nthe value is reinterpreted. This can cause wrapping if the value is too big\nfor the target signed type. However, the cast works as defined, so this lint\nis `Allow` by default."##,
4708 }, 5159 },
4709 LintCompletion { 5160 Lint {
4710 label: "clippy::cast_precision_loss", 5161 label: "clippy::cast_precision_loss",
4711 description: r##"Checks for casts from any numerical to a float type where\nthe receiving type cannot store all values from the original type without\nrounding errors. This possible rounding is to be expected, so this lint is\n`Allow` by default.\n\nBasically, this warns on casting any integer with 32 or more bits to `f32`\nor any 64-bit integer to `f64`."##, 5162 description: r##"Checks for casts from any numerical to a float type where\nthe receiving type cannot store all values from the original type without\nrounding errors. This possible rounding is to be expected, so this lint is\n`Allow` by default.\n\nBasically, this warns on casting any integer with 32 or more bits to `f32`\nor any 64-bit integer to `f64`."##,
4712 }, 5163 },
4713 LintCompletion { 5164 Lint {
4714 label: "clippy::cast_ptr_alignment", 5165 label: "clippy::cast_ptr_alignment",
4715 description: r##"Checks for casts, using `as` or `pointer::cast`,\nfrom a less-strictly-aligned pointer to a more-strictly-aligned pointer"##, 5166 description: r##"Checks for casts, using `as` or `pointer::cast`,\nfrom a less-strictly-aligned pointer to a more-strictly-aligned pointer"##,
4716 }, 5167 },
4717 LintCompletion { 5168 Lint {
4718 label: "clippy::cast_ref_to_mut", 5169 label: "clippy::cast_ref_to_mut",
4719 description: r##"Checks for casts of `&T` to `&mut T` anywhere in the code."##, 5170 description: r##"Checks for casts of `&T` to `&mut T` anywhere in the code."##,
4720 }, 5171 },
4721 LintCompletion { 5172 Lint {
4722 label: "clippy::cast_sign_loss", 5173 label: "clippy::cast_sign_loss",
4723 description: r##"Checks for casts from a signed to an unsigned numerical\ntype. In this case, negative values wrap around to large positive values,\nwhich can be quite surprising in practice. However, as the cast works as\ndefined, this lint is `Allow` by default."##, 5174 description: r##"Checks for casts from a signed to an unsigned numerical\ntype. In this case, negative values wrap around to large positive values,\nwhich can be quite surprising in practice. However, as the cast works as\ndefined, this lint is `Allow` by default."##,
4724 }, 5175 },
4725 LintCompletion { 5176 Lint {
4726 label: "clippy::char_lit_as_u8", 5177 label: "clippy::char_lit_as_u8",
4727 description: r##"Checks for expressions where a character literal is cast\nto `u8` and suggests using a byte literal instead."##, 5178 description: r##"Checks for expressions where a character literal is cast\nto `u8` and suggests using a byte literal instead."##,
4728 }, 5179 },
4729 LintCompletion { 5180 Lint {
4730 label: "clippy::chars_last_cmp", 5181 label: "clippy::chars_last_cmp",
4731 description: r##"Checks for usage of `_.chars().last()` or\n`_.chars().next_back()` on a `str` to check if it ends with a given char."##, 5182 description: r##"Checks for usage of `_.chars().last()` or\n`_.chars().next_back()` on a `str` to check if it ends with a given char."##,
4732 }, 5183 },
4733 LintCompletion { 5184 Lint {
4734 label: "clippy::chars_next_cmp", 5185 label: "clippy::chars_next_cmp",
4735 description: r##"Checks for usage of `.chars().next()` on a `str` to check\nif it starts with a given char."##, 5186 description: r##"Checks for usage of `.chars().next()` on a `str` to check\nif it starts with a given char."##,
4736 }, 5187 },
4737 LintCompletion { 5188 Lint {
4738 label: "clippy::checked_conversions", 5189 label: "clippy::checked_conversions",
4739 description: r##"Checks for explicit bounds checking when casting."##, 5190 description: r##"Checks for explicit bounds checking when casting."##,
4740 }, 5191 },
4741 LintCompletion { 5192 Lint {
4742 label: "clippy::clone_double_ref", 5193 label: "clippy::clone_double_ref",
4743 description: r##"Checks for usage of `.clone()` on an `&&T`."##, 5194 description: r##"Checks for usage of `.clone()` on an `&&T`."##,
4744 }, 5195 },
4745 LintCompletion { 5196 Lint {
4746 label: "clippy::clone_on_copy", 5197 label: "clippy::clone_on_copy",
4747 description: r##"Checks for usage of `.clone()` on a `Copy` type."##, 5198 description: r##"Checks for usage of `.clone()` on a `Copy` type."##,
4748 }, 5199 },
4749 LintCompletion { 5200 Lint {
4750 label: "clippy::clone_on_ref_ptr", 5201 label: "clippy::clone_on_ref_ptr",
4751 description: r##"Checks for usage of `.clone()` on a ref-counted pointer,\n(`Rc`, `Arc`, `rc::Weak`, or `sync::Weak`), and suggests calling Clone via unified\nfunction syntax instead (e.g., `Rc::clone(foo)`)."##, 5202 description: r##"Checks for usage of `.clone()` on a ref-counted pointer,\n(`Rc`, `Arc`, `rc::Weak`, or `sync::Weak`), and suggests calling Clone via unified\nfunction syntax instead (e.g., `Rc::clone(foo)`)."##,
4752 }, 5203 },
4753 LintCompletion { 5204 Lint {
4754 label: "clippy::cloned_instead_of_copied", 5205 label: "clippy::cloned_instead_of_copied",
4755 description: r##"Checks for usages of `cloned()` on an `Iterator` or `Option` where\n`copied()` could be used instead."##, 5206 description: r##"Checks for usages of `cloned()` on an `Iterator` or `Option` where\n`copied()` could be used instead."##,
4756 }, 5207 },
4757 LintCompletion { label: "clippy::cmp_nan", description: r##"Checks for comparisons to NaN."## }, 5208 Lint { label: "clippy::cmp_nan", description: r##"Checks for comparisons to NaN."## },
4758 LintCompletion { 5209 Lint {
4759 label: "clippy::cmp_null", 5210 label: "clippy::cmp_null",
4760 description: r##"This lint checks for equality comparisons with `ptr::null`"##, 5211 description: r##"This lint checks for equality comparisons with `ptr::null`"##,
4761 }, 5212 },
4762 LintCompletion { 5213 Lint {
4763 label: "clippy::cmp_owned", 5214 label: "clippy::cmp_owned",
4764 description: r##"Checks for conversions to owned values just for the sake\nof a comparison."##, 5215 description: r##"Checks for conversions to owned values just for the sake\nof a comparison."##,
4765 }, 5216 },
4766 LintCompletion { 5217 Lint {
4767 label: "clippy::cognitive_complexity", 5218 label: "clippy::cognitive_complexity",
4768 description: r##"Checks for methods with high cognitive complexity."##, 5219 description: r##"Checks for methods with high cognitive complexity."##,
4769 }, 5220 },
4770 LintCompletion { 5221 Lint {
4771 label: "clippy::collapsible_else_if", 5222 label: "clippy::collapsible_else_if",
4772 description: r##"Checks for collapsible `else { if ... }` expressions\nthat can be collapsed to `else if ...`."##, 5223 description: r##"Checks for collapsible `else { if ... }` expressions\nthat can be collapsed to `else if ...`."##,
4773 }, 5224 },
4774 LintCompletion { 5225 Lint {
4775 label: "clippy::collapsible_if", 5226 label: "clippy::collapsible_if",
4776 description: r##"Checks for nested `if` statements which can be collapsed\nby `&&`-combining their conditions."##, 5227 description: r##"Checks for nested `if` statements which can be collapsed\nby `&&`-combining their conditions."##,
4777 }, 5228 },
4778 LintCompletion { 5229 Lint {
4779 label: "clippy::collapsible_match", 5230 label: "clippy::collapsible_match",
4780 description: r##"Finds nested `match` or `if let` expressions where the patterns may be \"collapsed\" together\nwithout adding any branches.\n\nNote that this lint is not intended to find _all_ cases where nested match patterns can be merged, but only\ncases where merging would most likely make the code more readable."##, 5231 description: r##"Finds nested `match` or `if let` expressions where the patterns may be \"collapsed\" together\nwithout adding any branches.\n\nNote that this lint is not intended to find _all_ cases where nested match patterns can be merged, but only\ncases where merging would most likely make the code more readable."##,
4781 }, 5232 },
4782 LintCompletion { 5233 Lint {
4783 label: "clippy::comparison_chain", 5234 label: "clippy::comparison_chain",
4784 description: r##"Checks comparison chains written with `if` that can be\nrewritten with `match` and `cmp`."##, 5235 description: r##"Checks comparison chains written with `if` that can be\nrewritten with `match` and `cmp`."##,
4785 }, 5236 },
4786 LintCompletion { 5237 Lint {
4787 label: "clippy::comparison_to_empty", 5238 label: "clippy::comparison_to_empty",
4788 description: r##"Checks for comparing to an empty slice such as `\"\"` or `[]`,\nand suggests using `.is_empty()` where applicable."##, 5239 description: r##"Checks for comparing to an empty slice such as `\"\"` or `[]`,\nand suggests using `.is_empty()` where applicable."##,
4789 }, 5240 },
4790 LintCompletion { 5241 Lint {
4791 label: "clippy::copy_iterator", 5242 label: "clippy::copy_iterator",
4792 description: r##"Checks for types that implement `Copy` as well as\n`Iterator`."##, 5243 description: r##"Checks for types that implement `Copy` as well as\n`Iterator`."##,
4793 }, 5244 },
4794 LintCompletion { 5245 Lint {
4795 label: "clippy::create_dir", 5246 label: "clippy::create_dir",
4796 description: r##"Checks usage of `std::fs::create_dir` and suggest using `std::fs::create_dir_all` instead."##, 5247 description: r##"Checks usage of `std::fs::create_dir` and suggest using `std::fs::create_dir_all` instead."##,
4797 }, 5248 },
4798 LintCompletion { 5249 Lint {
4799 label: "clippy::crosspointer_transmute", 5250 label: "clippy::crosspointer_transmute",
4800 description: r##"Checks for transmutes between a type `T` and `*T`."##, 5251 description: r##"Checks for transmutes between a type `T` and `*T`."##,
4801 }, 5252 },
4802 LintCompletion { 5253 Lint { label: "clippy::dbg_macro", description: r##"Checks for usage of dbg!() macro."## },
4803 label: "clippy::dbg_macro", 5254 Lint {
4804 description: r##"Checks for usage of dbg!() macro."##,
4805 },
4806 LintCompletion {
4807 label: "clippy::debug_assert_with_mut_call", 5255 label: "clippy::debug_assert_with_mut_call",
4808 description: r##"Checks for function/method calls with a mutable\nparameter in `debug_assert!`, `debug_assert_eq!` and `debug_assert_ne!` macros."##, 5256 description: r##"Checks for function/method calls with a mutable\nparameter in `debug_assert!`, `debug_assert_eq!` and `debug_assert_ne!` macros."##,
4809 }, 5257 },
4810 LintCompletion { 5258 Lint {
4811 label: "clippy::decimal_literal_representation", 5259 label: "clippy::decimal_literal_representation",
4812 description: r##"Warns if there is a better representation for a numeric literal."##, 5260 description: r##"Warns if there is a better representation for a numeric literal."##,
4813 }, 5261 },
4814 LintCompletion { 5262 Lint {
4815 label: "clippy::declare_interior_mutable_const", 5263 label: "clippy::declare_interior_mutable_const",
4816 description: r##"Checks for declaration of `const` items which is interior\nmutable (e.g., contains a `Cell`, `Mutex`, `AtomicXxxx`, etc.)."##, 5264 description: r##"Checks for declaration of `const` items which is interior\nmutable (e.g., contains a `Cell`, `Mutex`, `AtomicXxxx`, etc.)."##,
4817 }, 5265 },
4818 LintCompletion { 5266 Lint {
4819 label: "clippy::default_numeric_fallback", 5267 label: "clippy::default_numeric_fallback",
4820 description: r##"Checks for usage of unconstrained numeric literals which may cause default numeric fallback in type\ninference.\n\nDefault numeric fallback means that if numeric types have not yet been bound to concrete\ntypes at the end of type inference, then integer type is bound to `i32`, and similarly\nfloating type is bound to `f64`.\n\nSee [RFC0212](https://github.com/rust-lang/rfcs/blob/master/text/0212-restore-int-fallback.md) for more information about the fallback."##, 5268 description: r##"Checks for usage of unconstrained numeric literals which may cause default numeric fallback in type\ninference.\n\nDefault numeric fallback means that if numeric types have not yet been bound to concrete\ntypes at the end of type inference, then integer type is bound to `i32`, and similarly\nfloating type is bound to `f64`.\n\nSee [RFC0212](https://github.com/rust-lang/rfcs/blob/master/text/0212-restore-int-fallback.md) for more information about the fallback."##,
4821 }, 5269 },
4822 LintCompletion { 5270 Lint {
4823 label: "clippy::default_trait_access", 5271 label: "clippy::default_trait_access",
4824 description: r##"Checks for literal calls to `Default::default()`."##, 5272 description: r##"Checks for literal calls to `Default::default()`."##,
4825 }, 5273 },
4826 LintCompletion { 5274 Lint {
4827 label: "clippy::deprecated_cfg_attr", 5275 label: "clippy::deprecated_cfg_attr",
4828 description: r##"Checks for `#[cfg_attr(rustfmt, rustfmt_skip)]` and suggests to replace it\nwith `#[rustfmt::skip]`."##, 5276 description: r##"Checks for `#[cfg_attr(rustfmt, rustfmt_skip)]` and suggests to replace it\nwith `#[rustfmt::skip]`."##,
4829 }, 5277 },
4830 LintCompletion { 5278 Lint {
4831 label: "clippy::deprecated_semver", 5279 label: "clippy::deprecated_semver",
4832 description: r##"Checks for `#[deprecated]` annotations with a `since`\nfield that is not a valid semantic version."##, 5280 description: r##"Checks for `#[deprecated]` annotations with a `since`\nfield that is not a valid semantic version."##,
4833 }, 5281 },
4834 LintCompletion { 5282 Lint {
4835 label: "clippy::deref_addrof", 5283 label: "clippy::deref_addrof",
4836 description: r##"Checks for usage of `*&` and `*&mut` in expressions."##, 5284 description: r##"Checks for usage of `*&` and `*&mut` in expressions."##,
4837 }, 5285 },
4838 LintCompletion { 5286 Lint {
4839 label: "clippy::derive_hash_xor_eq", 5287 label: "clippy::derive_hash_xor_eq",
4840 description: r##"Checks for deriving `Hash` but implementing `PartialEq`\nexplicitly or vice versa."##, 5288 description: r##"Checks for deriving `Hash` but implementing `PartialEq`\nexplicitly or vice versa."##,
4841 }, 5289 },
4842 LintCompletion { 5290 Lint {
4843 label: "clippy::derive_ord_xor_partial_ord", 5291 label: "clippy::derive_ord_xor_partial_ord",
4844 description: r##"Checks for deriving `Ord` but implementing `PartialOrd`\nexplicitly or vice versa."##, 5292 description: r##"Checks for deriving `Ord` but implementing `PartialOrd`\nexplicitly or vice versa."##,
4845 }, 5293 },
4846 LintCompletion { 5294 Lint {
4847 label: "clippy::disallowed_method", 5295 label: "clippy::disallowed_method",
4848 description: r##"Denies the configured methods and functions in clippy.toml"##, 5296 description: r##"Denies the configured methods and functions in clippy.toml"##,
4849 }, 5297 },
4850 LintCompletion { 5298 Lint {
4851 label: "clippy::diverging_sub_expression", 5299 label: "clippy::diverging_sub_expression",
4852 description: r##"Checks for diverging calls that are not match arms or\nstatements."##, 5300 description: r##"Checks for diverging calls that are not match arms or\nstatements."##,
4853 }, 5301 },
4854 LintCompletion { 5302 Lint {
4855 label: "clippy::doc_markdown", 5303 label: "clippy::doc_markdown",
4856 description: r##"Checks for the presence of `_`, `::` or camel-case words\noutside ticks in documentation."##, 5304 description: r##"Checks for the presence of `_`, `::` or camel-case words\noutside ticks in documentation."##,
4857 }, 5305 },
4858 LintCompletion { 5306 Lint {
4859 label: "clippy::double_comparisons", 5307 label: "clippy::double_comparisons",
4860 description: r##"Checks for double comparisons that could be simplified to a single expression."##, 5308 description: r##"Checks for double comparisons that could be simplified to a single expression."##,
4861 }, 5309 },
4862 LintCompletion { 5310 Lint {
4863 label: "clippy::double_must_use", 5311 label: "clippy::double_must_use",
4864 description: r##"Checks for a [`#[must_use]`] attribute without\nfurther information on functions and methods that return a type already\nmarked as `#[must_use]`.\n\n[`#[must_use]`]: https://doc.rust-lang.org/reference/attributes/diagnostics.html#the-must_use-attribute"##, 5312 description: r##"Checks for a [`#[must_use]`] attribute without\nfurther information on functions and methods that return a type already\nmarked as `#[must_use]`.\n\n[`#[must_use]`]: https://doc.rust-lang.org/reference/attributes/diagnostics.html#the-must_use-attribute"##,
4865 }, 5313 },
4866 LintCompletion { 5314 Lint {
4867 label: "clippy::double_neg", 5315 label: "clippy::double_neg",
4868 description: r##"Detects expressions of the form `--x`."##, 5316 description: r##"Detects expressions of the form `--x`."##,
4869 }, 5317 },
4870 LintCompletion { 5318 Lint {
4871 label: "clippy::double_parens", 5319 label: "clippy::double_parens",
4872 description: r##"Checks for unnecessary double parentheses."##, 5320 description: r##"Checks for unnecessary double parentheses."##,
4873 }, 5321 },
4874 LintCompletion { 5322 Lint {
4875 label: "clippy::drop_copy", 5323 label: "clippy::drop_copy",
4876 description: r##"Checks for calls to `std::mem::drop` with a value\nthat derives the Copy trait"##, 5324 description: r##"Checks for calls to `std::mem::drop` with a value\nthat derives the Copy trait"##,
4877 }, 5325 },
4878 LintCompletion { 5326 Lint {
4879 label: "clippy::drop_ref", 5327 label: "clippy::drop_ref",
4880 description: r##"Checks for calls to `std::mem::drop` with a reference\ninstead of an owned value."##, 5328 description: r##"Checks for calls to `std::mem::drop` with a reference\ninstead of an owned value."##,
4881 }, 5329 },
4882 LintCompletion { 5330 Lint {
4883 label: "clippy::duplicate_underscore_argument", 5331 label: "clippy::duplicate_underscore_argument",
4884 description: r##"Checks for function arguments having the similar names\ndiffering by an underscore."##, 5332 description: r##"Checks for function arguments having the similar names\ndiffering by an underscore."##,
4885 }, 5333 },
4886 LintCompletion { 5334 Lint {
4887 label: "clippy::duration_subsec", 5335 label: "clippy::duration_subsec",
4888 description: r##"Checks for calculation of subsecond microseconds or milliseconds\nfrom other `Duration` methods."##, 5336 description: r##"Checks for calculation of subsecond microseconds or milliseconds\nfrom other `Duration` methods."##,
4889 }, 5337 },
4890 LintCompletion { 5338 Lint {
4891 label: "clippy::else_if_without_else", 5339 label: "clippy::else_if_without_else",
4892 description: r##"Checks for usage of if expressions with an `else if` branch,\nbut without a final `else` branch."##, 5340 description: r##"Checks for usage of if expressions with an `else if` branch,\nbut without a final `else` branch."##,
4893 }, 5341 },
4894 LintCompletion { 5342 Lint {
4895 label: "clippy::empty_enum", 5343 label: "clippy::empty_enum",
4896 description: r##"Checks for `enum`s with no variants.\n\nAs of this writing, the `never_type` is still a\nnightly-only experimental API. Therefore, this lint is only triggered\nif the `never_type` is enabled."##, 5344 description: r##"Checks for `enum`s with no variants.\n\nAs of this writing, the `never_type` is still a\nnightly-only experimental API. Therefore, this lint is only triggered\nif the `never_type` is enabled."##,
4897 }, 5345 },
4898 LintCompletion { 5346 Lint {
4899 label: "clippy::empty_line_after_outer_attr", 5347 label: "clippy::empty_line_after_outer_attr",
4900 description: r##"Checks for empty lines after outer attributes"##, 5348 description: r##"Checks for empty lines after outer attributes"##,
4901 }, 5349 },
4902 LintCompletion { 5350 Lint { label: "clippy::empty_loop", description: r##"Checks for empty `loop` expressions."## },
4903 label: "clippy::empty_loop", 5351 Lint {
4904 description: r##"Checks for empty `loop` expressions."##,
4905 },
4906 LintCompletion {
4907 label: "clippy::enum_clike_unportable_variant", 5352 label: "clippy::enum_clike_unportable_variant",
4908 description: r##"Checks for C-like enumerations that are\n`repr(isize/usize)` and have values that don't fit into an `i32`."##, 5353 description: r##"Checks for C-like enumerations that are\n`repr(isize/usize)` and have values that don't fit into an `i32`."##,
4909 }, 5354 },
4910 LintCompletion { 5355 Lint { label: "clippy::enum_glob_use", description: r##"Checks for `use Enum::*`."## },
4911 label: "clippy::enum_glob_use", 5356 Lint {
4912 description: r##"Checks for `use Enum::*`."##,
4913 },
4914 LintCompletion {
4915 label: "clippy::enum_variant_names", 5357 label: "clippy::enum_variant_names",
4916 description: r##"Detects enumeration variants that are prefixed or suffixed\nby the same characters."##, 5358 description: r##"Detects enumeration variants that are prefixed or suffixed\nby the same characters."##,
4917 }, 5359 },
4918 LintCompletion { 5360 Lint {
4919 label: "clippy::eq_op", 5361 label: "clippy::eq_op",
4920 description: r##"Checks for equal operands to comparison, logical and\nbitwise, difference and division binary operators (`==`, `>`, etc., `&&`,\n`||`, `&`, `|`, `^`, `-` and `/`)."##, 5362 description: r##"Checks for equal operands to comparison, logical and\nbitwise, difference and division binary operators (`==`, `>`, etc., `&&`,\n`||`, `&`, `|`, `^`, `-` and `/`)."##,
4921 }, 5363 },
4922 LintCompletion { 5364 Lint {
4923 label: "clippy::erasing_op", 5365 label: "clippy::erasing_op",
4924 description: r##"Checks for erasing operations, e.g., `x * 0`."##, 5366 description: r##"Checks for erasing operations, e.g., `x * 0`."##,
4925 }, 5367 },
4926 LintCompletion { 5368 Lint {
4927 label: "clippy::eval_order_dependence", 5369 label: "clippy::eval_order_dependence",
4928 description: r##"Checks for a read and a write to the same variable where\nwhether the read occurs before or after the write depends on the evaluation\norder of sub-expressions."##, 5370 description: r##"Checks for a read and a write to the same variable where\nwhether the read occurs before or after the write depends on the evaluation\norder of sub-expressions."##,
4929 }, 5371 },
4930 LintCompletion { 5372 Lint {
4931 label: "clippy::excessive_precision", 5373 label: "clippy::excessive_precision",
4932 description: r##"Checks for float literals with a precision greater\nthan that supported by the underlying type."##, 5374 description: r##"Checks for float literals with a precision greater\nthan that supported by the underlying type."##,
4933 }, 5375 },
4934 LintCompletion { 5376 Lint {
4935 label: "clippy::exhaustive_enums", 5377 label: "clippy::exhaustive_enums",
4936 description: r##"Warns on any exported `enum`s that are not tagged `#[non_exhaustive]`"##, 5378 description: r##"Warns on any exported `enum`s that are not tagged `#[non_exhaustive]`"##,
4937 }, 5379 },
4938 LintCompletion { 5380 Lint {
4939 label: "clippy::exhaustive_structs", 5381 label: "clippy::exhaustive_structs",
4940 description: r##"Warns on any exported `structs`s that are not tagged `#[non_exhaustive]`"##, 5382 description: r##"Warns on any exported `structs`s that are not tagged `#[non_exhaustive]`"##,
4941 }, 5383 },
4942 LintCompletion { 5384 Lint {
4943 label: "clippy::exit", 5385 label: "clippy::exit",
4944 description: r##"`exit()` terminates the program and doesn't provide a\nstack trace."##, 5386 description: r##"`exit()` terminates the program and doesn't provide a\nstack trace."##,
4945 }, 5387 },
4946 LintCompletion { 5388 Lint {
4947 label: "clippy::expect_fun_call", 5389 label: "clippy::expect_fun_call",
4948 description: r##"Checks for calls to `.expect(&format!(...))`, `.expect(foo(..))`,\netc., and suggests to use `unwrap_or_else` instead"##, 5390 description: r##"Checks for calls to `.expect(&format!(...))`, `.expect(foo(..))`,\netc., and suggests to use `unwrap_or_else` instead"##,
4949 }, 5391 },
4950 LintCompletion { 5392 Lint {
4951 label: "clippy::expect_used", 5393 label: "clippy::expect_used",
4952 description: r##"Checks for `.expect()` calls on `Option`s and `Result`s."##, 5394 description: r##"Checks for `.expect()` calls on `Option`s and `Result`s."##,
4953 }, 5395 },
4954 LintCompletion { 5396 Lint {
4955 label: "clippy::expl_impl_clone_on_copy", 5397 label: "clippy::expl_impl_clone_on_copy",
4956 description: r##"Checks for explicit `Clone` implementations for `Copy`\ntypes."##, 5398 description: r##"Checks for explicit `Clone` implementations for `Copy`\ntypes."##,
4957 }, 5399 },
4958 LintCompletion { 5400 Lint {
4959 label: "clippy::explicit_counter_loop", 5401 label: "clippy::explicit_counter_loop",
4960 description: r##"Checks `for` loops over slices with an explicit counter\nand suggests the use of `.enumerate()`."##, 5402 description: r##"Checks `for` loops over slices with an explicit counter\nand suggests the use of `.enumerate()`."##,
4961 }, 5403 },
4962 LintCompletion { 5404 Lint {
4963 label: "clippy::explicit_deref_methods", 5405 label: "clippy::explicit_deref_methods",
4964 description: r##"Checks for explicit `deref()` or `deref_mut()` method calls."##, 5406 description: r##"Checks for explicit `deref()` or `deref_mut()` method calls."##,
4965 }, 5407 },
4966 LintCompletion { 5408 Lint {
4967 label: "clippy::explicit_into_iter_loop", 5409 label: "clippy::explicit_into_iter_loop",
4968 description: r##"Checks for loops on `y.into_iter()` where `y` will do, and\nsuggests the latter."##, 5410 description: r##"Checks for loops on `y.into_iter()` where `y` will do, and\nsuggests the latter."##,
4969 }, 5411 },
4970 LintCompletion { 5412 Lint {
4971 label: "clippy::explicit_iter_loop", 5413 label: "clippy::explicit_iter_loop",
4972 description: r##"Checks for loops on `x.iter()` where `&x` will do, and\nsuggests the latter."##, 5414 description: r##"Checks for loops on `x.iter()` where `&x` will do, and\nsuggests the latter."##,
4973 }, 5415 },
4974 LintCompletion { 5416 Lint {
4975 label: "clippy::explicit_write", 5417 label: "clippy::explicit_write",
4976 description: r##"Checks for usage of `write!()` / `writeln()!` which can be\nreplaced with `(e)print!()` / `(e)println!()`"##, 5418 description: r##"Checks for usage of `write!()` / `writeln()!` which can be\nreplaced with `(e)print!()` / `(e)println!()`"##,
4977 }, 5419 },
4978 LintCompletion { 5420 Lint {
4979 label: "clippy::extend_from_slice", 5421 label: "clippy::extend_from_slice",
4980 description: r##"Nothing. This lint has been deprecated."##, 5422 description: r##"Nothing. This lint has been deprecated."##,
4981 }, 5423 },
4982 LintCompletion { 5424 Lint {
4983 label: "clippy::extra_unused_lifetimes", 5425 label: "clippy::extra_unused_lifetimes",
4984 description: r##"Checks for lifetimes in generics that are never used\nanywhere else."##, 5426 description: r##"Checks for lifetimes in generics that are never used\nanywhere else."##,
4985 }, 5427 },
4986 LintCompletion { 5428 Lint {
4987 label: "clippy::fallible_impl_from", 5429 label: "clippy::fallible_impl_from",
4988 description: r##"Checks for impls of `From<..>` that contain `panic!()` or `unwrap()`"##, 5430 description: r##"Checks for impls of `From<..>` that contain `panic!()` or `unwrap()`"##,
4989 }, 5431 },
4990 LintCompletion { 5432 Lint {
4991 label: "clippy::field_reassign_with_default", 5433 label: "clippy::field_reassign_with_default",
4992 description: r##"Checks for immediate reassignment of fields initialized\nwith Default::default()."##, 5434 description: r##"Checks for immediate reassignment of fields initialized\nwith Default::default()."##,
4993 }, 5435 },
4994 LintCompletion { 5436 Lint {
4995 label: "clippy::filetype_is_file", 5437 label: "clippy::filetype_is_file",
4996 description: r##"Checks for `FileType::is_file()`."##, 5438 description: r##"Checks for `FileType::is_file()`."##,
4997 }, 5439 },
4998 LintCompletion { 5440 Lint {
4999 label: "clippy::filter_map", 5441 label: "clippy::filter_map",
5000 description: r##"Nothing. This lint has been deprecated."##, 5442 description: r##"Nothing. This lint has been deprecated."##,
5001 }, 5443 },
5002 LintCompletion { 5444 Lint {
5003 label: "clippy::filter_map_identity", 5445 label: "clippy::filter_map_identity",
5004 description: r##"Checks for usage of `filter_map(|x| x)`."##, 5446 description: r##"Checks for usage of `filter_map(|x| x)`."##,
5005 }, 5447 },
5006 LintCompletion { 5448 Lint {
5007 label: "clippy::filter_map_next", 5449 label: "clippy::filter_map_next",
5008 description: r##"Checks for usage of `_.filter_map(_).next()`."##, 5450 description: r##"Checks for usage of `_.filter_map(_).next()`."##,
5009 }, 5451 },
5010 LintCompletion { 5452 Lint {
5011 label: "clippy::filter_next", 5453 label: "clippy::filter_next",
5012 description: r##"Checks for usage of `_.filter(_).next()`."##, 5454 description: r##"Checks for usage of `_.filter(_).next()`."##,
5013 }, 5455 },
5014 LintCompletion { 5456 Lint { label: "clippy::find_map", description: r##"Nothing. This lint has been deprecated."## },
5015 label: "clippy::find_map", 5457 Lint {
5016 description: r##"Nothing. This lint has been deprecated."##,
5017 },
5018 LintCompletion {
5019 label: "clippy::flat_map_identity", 5458 label: "clippy::flat_map_identity",
5020 description: r##"Checks for usage of `flat_map(|x| x)`."##, 5459 description: r##"Checks for usage of `flat_map(|x| x)`."##,
5021 }, 5460 },
5022 LintCompletion { 5461 Lint {
5023 label: "clippy::flat_map_option", 5462 label: "clippy::flat_map_option",
5024 description: r##"Checks for usages of `Iterator::flat_map()` where `filter_map()` could be\nused instead."##, 5463 description: r##"Checks for usages of `Iterator::flat_map()` where `filter_map()` could be\nused instead."##,
5025 }, 5464 },
5026 LintCompletion { 5465 Lint { label: "clippy::float_arithmetic", description: r##"Checks for float arithmetic."## },
5027 label: "clippy::float_arithmetic", 5466 Lint {
5028 description: r##"Checks for float arithmetic."##,
5029 },
5030 LintCompletion {
5031 label: "clippy::float_cmp", 5467 label: "clippy::float_cmp",
5032 description: r##"Checks for (in-)equality comparisons on floating-point\nvalues (apart from zero), except in functions called `*eq*` (which probably\nimplement equality for a type involving floats)."##, 5468 description: r##"Checks for (in-)equality comparisons on floating-point\nvalues (apart from zero), except in functions called `*eq*` (which probably\nimplement equality for a type involving floats)."##,
5033 }, 5469 },
5034 LintCompletion { 5470 Lint {
5035 label: "clippy::float_cmp_const", 5471 label: "clippy::float_cmp_const",
5036 description: r##"Checks for (in-)equality comparisons on floating-point\nvalue and constant, except in functions called `*eq*` (which probably\nimplement equality for a type involving floats)."##, 5472 description: r##"Checks for (in-)equality comparisons on floating-point\nvalue and constant, except in functions called `*eq*` (which probably\nimplement equality for a type involving floats)."##,
5037 }, 5473 },
5038 LintCompletion { 5474 Lint {
5039 label: "clippy::float_equality_without_abs", 5475 label: "clippy::float_equality_without_abs",
5040 description: r##"Checks for statements of the form `(a - b) < f32::EPSILON` or\n`(a - b) < f64::EPSILON`. Notes the missing `.abs()`."##, 5476 description: r##"Checks for statements of the form `(a - b) < f32::EPSILON` or\n`(a - b) < f64::EPSILON`. Notes the missing `.abs()`."##,
5041 }, 5477 },
5042 LintCompletion { 5478 Lint {
5043 label: "clippy::fn_address_comparisons", 5479 label: "clippy::fn_address_comparisons",
5044 description: r##"Checks for comparisons with an address of a function item."##, 5480 description: r##"Checks for comparisons with an address of a function item."##,
5045 }, 5481 },
5046 LintCompletion { 5482 Lint {
5047 label: "clippy::fn_params_excessive_bools", 5483 label: "clippy::fn_params_excessive_bools",
5048 description: r##"Checks for excessive use of\nbools in function definitions."##, 5484 description: r##"Checks for excessive use of\nbools in function definitions."##,
5049 }, 5485 },
5050 LintCompletion { 5486 Lint {
5051 label: "clippy::fn_to_numeric_cast", 5487 label: "clippy::fn_to_numeric_cast",
5052 description: r##"Checks for casts of function pointers to something other than usize"##, 5488 description: r##"Checks for casts of function pointers to something other than usize"##,
5053 }, 5489 },
5054 LintCompletion { 5490 Lint {
5055 label: "clippy::fn_to_numeric_cast_with_truncation", 5491 label: "clippy::fn_to_numeric_cast_with_truncation",
5056 description: r##"Checks for casts of a function pointer to a numeric type not wide enough to\nstore address."##, 5492 description: r##"Checks for casts of a function pointer to a numeric type not wide enough to\nstore address."##,
5057 }, 5493 },
5058 LintCompletion { 5494 Lint {
5059 label: "clippy::for_kv_map", 5495 label: "clippy::for_kv_map",
5060 description: r##"Checks for iterating a map (`HashMap` or `BTreeMap`) and\nignoring either the keys or values."##, 5496 description: r##"Checks for iterating a map (`HashMap` or `BTreeMap`) and\nignoring either the keys or values."##,
5061 }, 5497 },
5062 LintCompletion { 5498 Lint {
5063 label: "clippy::for_loops_over_fallibles", 5499 label: "clippy::for_loops_over_fallibles",
5064 description: r##"Checks for `for` loops over `Option` or `Result` values."##, 5500 description: r##"Checks for `for` loops over `Option` or `Result` values."##,
5065 }, 5501 },
5066 LintCompletion { 5502 Lint {
5067 label: "clippy::forget_copy", 5503 label: "clippy::forget_copy",
5068 description: r##"Checks for calls to `std::mem::forget` with a value that\nderives the Copy trait"##, 5504 description: r##"Checks for calls to `std::mem::forget` with a value that\nderives the Copy trait"##,
5069 }, 5505 },
5070 LintCompletion { 5506 Lint {
5071 label: "clippy::forget_ref", 5507 label: "clippy::forget_ref",
5072 description: r##"Checks for calls to `std::mem::forget` with a reference\ninstead of an owned value."##, 5508 description: r##"Checks for calls to `std::mem::forget` with a reference\ninstead of an owned value."##,
5073 }, 5509 },
5074 LintCompletion { 5510 Lint {
5075 label: "clippy::from_iter_instead_of_collect", 5511 label: "clippy::from_iter_instead_of_collect",
5076 description: r##"Checks for `from_iter()` function calls on types that implement the `FromIterator`\ntrait."##, 5512 description: r##"Checks for `from_iter()` function calls on types that implement the `FromIterator`\ntrait."##,
5077 }, 5513 },
5078 LintCompletion { 5514 Lint {
5079 label: "clippy::from_over_into", 5515 label: "clippy::from_over_into",
5080 description: r##"Searches for implementations of the `Into<..>` trait and suggests to implement `From<..>` instead."##, 5516 description: r##"Searches for implementations of the `Into<..>` trait and suggests to implement `From<..>` instead."##,
5081 }, 5517 },
5082 LintCompletion { 5518 Lint {
5083 label: "clippy::from_str_radix_10", 5519 label: "clippy::from_str_radix_10",
5084 description: r##"Checks for function invocations of the form `primitive::from_str_radix(s, 10)`"##, 5520 description: r##"Checks for function invocations of the form `primitive::from_str_radix(s, 10)`"##,
5085 }, 5521 },
5086 LintCompletion { 5522 Lint {
5087 label: "clippy::future_not_send", 5523 label: "clippy::future_not_send",
5088 description: r##"This lint requires Future implementations returned from\nfunctions and methods to implement the `Send` marker trait. It is mostly\nused by library authors (public and internal) that target an audience where\nmultithreaded executors are likely to be used for running these Futures."##, 5524 description: r##"This lint requires Future implementations returned from\nfunctions and methods to implement the `Send` marker trait. It is mostly\nused by library authors (public and internal) that target an audience where\nmultithreaded executors are likely to be used for running these Futures."##,
5089 }, 5525 },
5090 LintCompletion { 5526 Lint {
5091 label: "clippy::get_last_with_len", 5527 label: "clippy::get_last_with_len",
5092 description: r##"Checks for using `x.get(x.len() - 1)` instead of\n`x.last()`."##, 5528 description: r##"Checks for using `x.get(x.len() - 1)` instead of\n`x.last()`."##,
5093 }, 5529 },
5094 LintCompletion { 5530 Lint {
5095 label: "clippy::get_unwrap", 5531 label: "clippy::get_unwrap",
5096 description: r##"Checks for use of `.get().unwrap()` (or\n`.get_mut().unwrap`) on a standard library type which implements `Index`"##, 5532 description: r##"Checks for use of `.get().unwrap()` (or\n`.get_mut().unwrap`) on a standard library type which implements `Index`"##,
5097 }, 5533 },
5098 LintCompletion { 5534 Lint {
5099 label: "clippy::identity_op", 5535 label: "clippy::identity_op",
5100 description: r##"Checks for identity operations, e.g., `x + 0`."##, 5536 description: r##"Checks for identity operations, e.g., `x + 0`."##,
5101 }, 5537 },
5102 LintCompletion { 5538 Lint {
5103 label: "clippy::if_let_mutex", 5539 label: "clippy::if_let_mutex",
5104 description: r##"Checks for `Mutex::lock` calls in `if let` expression\nwith lock calls in any of the else blocks."##, 5540 description: r##"Checks for `Mutex::lock` calls in `if let` expression\nwith lock calls in any of the else blocks."##,
5105 }, 5541 },
5106 LintCompletion { 5542 Lint {
5107 label: "clippy::if_let_redundant_pattern_matching", 5543 label: "clippy::if_let_redundant_pattern_matching",
5108 description: r##"Nothing. This lint has been deprecated."##, 5544 description: r##"Nothing. This lint has been deprecated."##,
5109 }, 5545 },
5110 LintCompletion { 5546 Lint {
5111 label: "clippy::if_let_some_result", 5547 label: "clippy::if_let_some_result",
5112 description: r##"* Checks for unnecessary `ok()` in if let."##, 5548 description: r##"* Checks for unnecessary `ok()` in if let."##,
5113 }, 5549 },
5114 LintCompletion { 5550 Lint {
5115 label: "clippy::if_not_else", 5551 label: "clippy::if_not_else",
5116 description: r##"Checks for usage of `!` or `!=` in an if condition with an\nelse branch."##, 5552 description: r##"Checks for usage of `!` or `!=` in an if condition with an\nelse branch."##,
5117 }, 5553 },
5118 LintCompletion { 5554 Lint {
5119 label: "clippy::if_same_then_else", 5555 label: "clippy::if_same_then_else",
5120 description: r##"Checks for `if/else` with the same body as the *then* part\nand the *else* part."##, 5556 description: r##"Checks for `if/else` with the same body as the *then* part\nand the *else* part."##,
5121 }, 5557 },
5122 LintCompletion { 5558 Lint {
5123 label: "clippy::if_then_some_else_none", 5559 label: "clippy::if_then_some_else_none",
5124 description: r##"Checks for if-else that could be written to `bool::then`."##, 5560 description: r##"Checks for if-else that could be written to `bool::then`."##,
5125 }, 5561 },
5126 LintCompletion { 5562 Lint {
5127 label: "clippy::ifs_same_cond", 5563 label: "clippy::ifs_same_cond",
5128 description: r##"Checks for consecutive `if`s with the same condition."##, 5564 description: r##"Checks for consecutive `if`s with the same condition."##,
5129 }, 5565 },
5130 LintCompletion { 5566 Lint {
5131 label: "clippy::implicit_clone", 5567 label: "clippy::implicit_clone",
5132 description: r##"Checks for the usage of `_.to_owned()`, `vec.to_vec()`, or similar when calling `_.clone()` would be clearer."##, 5568 description: r##"Checks for the usage of `_.to_owned()`, `vec.to_vec()`, or similar when calling `_.clone()` would be clearer."##,
5133 }, 5569 },
5134 LintCompletion { 5570 Lint {
5135 label: "clippy::implicit_hasher", 5571 label: "clippy::implicit_hasher",
5136 description: r##"Checks for public `impl` or `fn` missing generalization\nover different hashers and implicitly defaulting to the default hashing\nalgorithm (`SipHash`)."##, 5572 description: r##"Checks for public `impl` or `fn` missing generalization\nover different hashers and implicitly defaulting to the default hashing\nalgorithm (`SipHash`)."##,
5137 }, 5573 },
5138 LintCompletion { 5574 Lint {
5139 label: "clippy::implicit_return", 5575 label: "clippy::implicit_return",
5140 description: r##"Checks for missing return statements at the end of a block."##, 5576 description: r##"Checks for missing return statements at the end of a block."##,
5141 }, 5577 },
5142 LintCompletion { 5578 Lint {
5143 label: "clippy::implicit_saturating_sub", 5579 label: "clippy::implicit_saturating_sub",
5144 description: r##"Checks for implicit saturating subtraction."##, 5580 description: r##"Checks for implicit saturating subtraction."##,
5145 }, 5581 },
5146 LintCompletion { 5582 Lint {
5147 label: "clippy::imprecise_flops", 5583 label: "clippy::imprecise_flops",
5148 description: r##"Looks for floating-point expressions that\ncan be expressed using built-in methods to improve accuracy\nat the cost of performance."##, 5584 description: r##"Looks for floating-point expressions that\ncan be expressed using built-in methods to improve accuracy\nat the cost of performance."##,
5149 }, 5585 },
5150 LintCompletion { 5586 Lint {
5151 label: "clippy::inconsistent_digit_grouping", 5587 label: "clippy::inconsistent_digit_grouping",
5152 description: r##"Warns if an integral or floating-point constant is\ngrouped inconsistently with underscores."##, 5588 description: r##"Warns if an integral or floating-point constant is\ngrouped inconsistently with underscores."##,
5153 }, 5589 },
5154 LintCompletion { 5590 Lint {
5155 label: "clippy::inconsistent_struct_constructor", 5591 label: "clippy::inconsistent_struct_constructor",
5156 description: r##"Checks for struct constructors where all fields are shorthand and\nthe order of the field init shorthand in the constructor is inconsistent\nwith the order in the struct definition."##, 5592 description: r##"Checks for struct constructors where all fields are shorthand and\nthe order of the field init shorthand in the constructor is inconsistent\nwith the order in the struct definition."##,
5157 }, 5593 },
5158 LintCompletion { 5594 Lint {
5159 label: "clippy::indexing_slicing", 5595 label: "clippy::indexing_slicing",
5160 description: r##"Checks for usage of indexing or slicing. Arrays are special cases, this lint\ndoes report on arrays if we can tell that slicing operations are in bounds and does not\nlint on constant `usize` indexing on arrays because that is handled by rustc's `const_err` lint."##, 5596 description: r##"Checks for usage of indexing or slicing. Arrays are special cases, this lint\ndoes report on arrays if we can tell that slicing operations are in bounds and does not\nlint on constant `usize` indexing on arrays because that is handled by rustc's `const_err` lint."##,
5161 }, 5597 },
5162 LintCompletion { 5598 Lint {
5163 label: "clippy::ineffective_bit_mask", 5599 label: "clippy::ineffective_bit_mask",
5164 description: r##"Checks for bit masks in comparisons which can be removed\nwithout changing the outcome. The basic structure can be seen in the\nfollowing table:\n\n|Comparison| Bit Op |Example |equals |\n|----------|---------|-----------|-------|\n|`>` / `<=`|`|` / `^`|`x | 2 > 3`|`x > 3`|\n|`<` / `>=`|`|` / `^`|`x ^ 1 < 4`|`x < 4`|"##, 5600 description: r##"Checks for bit masks in comparisons which can be removed\nwithout changing the outcome. The basic structure can be seen in the\nfollowing table:\n\n|Comparison| Bit Op |Example |equals |\n|----------|---------|-----------|-------|\n|`>` / `<=`|`|` / `^`|`x | 2 > 3`|`x > 3`|\n|`<` / `>=`|`|` / `^`|`x ^ 1 < 4`|`x < 4`|"##,
5165 }, 5601 },
5166 LintCompletion { 5602 Lint {
5167 label: "clippy::inefficient_to_string", 5603 label: "clippy::inefficient_to_string",
5168 description: r##"Checks for usage of `.to_string()` on an `&&T` where\n`T` implements `ToString` directly (like `&&str` or `&&String`)."##, 5604 description: r##"Checks for usage of `.to_string()` on an `&&T` where\n`T` implements `ToString` directly (like `&&str` or `&&String`)."##,
5169 }, 5605 },
5170 LintCompletion { 5606 Lint {
5171 label: "clippy::infallible_destructuring_match", 5607 label: "clippy::infallible_destructuring_match",
5172 description: r##"Checks for matches being used to destructure a single-variant enum\nor tuple struct where a `let` will suffice."##, 5608 description: r##"Checks for matches being used to destructure a single-variant enum\nor tuple struct where a `let` will suffice."##,
5173 }, 5609 },
5174 LintCompletion { 5610 Lint {
5175 label: "clippy::infinite_iter", 5611 label: "clippy::infinite_iter",
5176 description: r##"Checks for iteration that is guaranteed to be infinite."##, 5612 description: r##"Checks for iteration that is guaranteed to be infinite."##,
5177 }, 5613 },
5178 LintCompletion { 5614 Lint {
5179 label: "clippy::inherent_to_string", 5615 label: "clippy::inherent_to_string",
5180 description: r##"Checks for the definition of inherent methods with a signature of `to_string(&self) -> String`."##, 5616 description: r##"Checks for the definition of inherent methods with a signature of `to_string(&self) -> String`."##,
5181 }, 5617 },
5182 LintCompletion { 5618 Lint {
5183 label: "clippy::inherent_to_string_shadow_display", 5619 label: "clippy::inherent_to_string_shadow_display",
5184 description: r##"Checks for the definition of inherent methods with a signature of `to_string(&self) -> String` and if the type implementing this method also implements the `Display` trait."##, 5620 description: r##"Checks for the definition of inherent methods with a signature of `to_string(&self) -> String` and if the type implementing this method also implements the `Display` trait."##,
5185 }, 5621 },
5186 LintCompletion { 5622 Lint {
5187 label: "clippy::inline_always", 5623 label: "clippy::inline_always",
5188 description: r##"Checks for items annotated with `#[inline(always)]`,\nunless the annotated function is empty or simply panics."##, 5624 description: r##"Checks for items annotated with `#[inline(always)]`,\nunless the annotated function is empty or simply panics."##,
5189 }, 5625 },
5190 LintCompletion { 5626 Lint {
5191 label: "clippy::inline_asm_x86_att_syntax", 5627 label: "clippy::inline_asm_x86_att_syntax",
5192 description: r##"Checks for usage of AT&T x86 assembly syntax."##, 5628 description: r##"Checks for usage of AT&T x86 assembly syntax."##,
5193 }, 5629 },
5194 LintCompletion { 5630 Lint {
5195 label: "clippy::inline_asm_x86_intel_syntax", 5631 label: "clippy::inline_asm_x86_intel_syntax",
5196 description: r##"Checks for usage of Intel x86 assembly syntax."##, 5632 description: r##"Checks for usage of Intel x86 assembly syntax."##,
5197 }, 5633 },
5198 LintCompletion { 5634 Lint {
5199 label: "clippy::inline_fn_without_body", 5635 label: "clippy::inline_fn_without_body",
5200 description: r##"Checks for `#[inline]` on trait methods without bodies"##, 5636 description: r##"Checks for `#[inline]` on trait methods without bodies"##,
5201 }, 5637 },
5202 LintCompletion { 5638 Lint {
5203 label: "clippy::inspect_for_each", 5639 label: "clippy::inspect_for_each",
5204 description: r##"Checks for usage of `inspect().for_each()`."##, 5640 description: r##"Checks for usage of `inspect().for_each()`."##,
5205 }, 5641 },
5206 LintCompletion { 5642 Lint {
5207 label: "clippy::int_plus_one", 5643 label: "clippy::int_plus_one",
5208 description: r##"Checks for usage of `x >= y + 1` or `x - 1 >= y` (and `<=`) in a block"##, 5644 description: r##"Checks for usage of `x >= y + 1` or `x - 1 >= y` (and `<=`) in a block"##,
5209 }, 5645 },
5210 LintCompletion { 5646 Lint {
5211 label: "clippy::integer_arithmetic", 5647 label: "clippy::integer_arithmetic",
5212 description: r##"Checks for integer arithmetic operations which could overflow or panic.\n\nSpecifically, checks for any operators (`+`, `-`, `*`, `<<`, etc) which are capable\nof overflowing according to the [Rust\nReference](https://doc.rust-lang.org/reference/expressions/operator-expr.html#overflow),\nor which can panic (`/`, `%`). No bounds analysis or sophisticated reasoning is\nattempted."##, 5648 description: r##"Checks for integer arithmetic operations which could overflow or panic.\n\nSpecifically, checks for any operators (`+`, `-`, `*`, `<<`, etc) which are capable\nof overflowing according to the [Rust\nReference](https://doc.rust-lang.org/reference/expressions/operator-expr.html#overflow),\nor which can panic (`/`, `%`). No bounds analysis or sophisticated reasoning is\nattempted."##,
5213 }, 5649 },
5214 LintCompletion { 5650 Lint { label: "clippy::integer_division", description: r##"Checks for division of integers"## },
5215 label: "clippy::integer_division", 5651 Lint {
5216 description: r##"Checks for division of integers"##,
5217 },
5218 LintCompletion {
5219 label: "clippy::into_iter_on_ref", 5652 label: "clippy::into_iter_on_ref",
5220 description: r##"Checks for `into_iter` calls on references which should be replaced by `iter`\nor `iter_mut`."##, 5653 description: r##"Checks for `into_iter` calls on references which should be replaced by `iter`\nor `iter_mut`."##,
5221 }, 5654 },
5222 LintCompletion { 5655 Lint {
5223 label: "clippy::invalid_atomic_ordering", 5656 label: "clippy::invalid_atomic_ordering",
5224 description: r##"Checks for usage of invalid atomic\nordering in atomic loads/stores/exchanges/updates and\nmemory fences."##, 5657 description: r##"Checks for usage of invalid atomic\nordering in atomic loads/stores/exchanges/updates and\nmemory fences."##,
5225 }, 5658 },
5226 LintCompletion { 5659 Lint {
5227 label: "clippy::invalid_null_ptr_usage", 5660 label: "clippy::invalid_null_ptr_usage",
5228 description: r##"This lint checks for invalid usages of `ptr::null`."##, 5661 description: r##"This lint checks for invalid usages of `ptr::null`."##,
5229 }, 5662 },
5230 LintCompletion { 5663 Lint {
5231 label: "clippy::invalid_regex", 5664 label: "clippy::invalid_regex",
5232 description: r##"Checks [regex](https://crates.io/crates/regex) creation\n(with `Regex::new`, `RegexBuilder::new`, or `RegexSet::new`) for correct\nregex syntax."##, 5665 description: r##"Checks [regex](https://crates.io/crates/regex) creation\n(with `Regex::new`, `RegexBuilder::new`, or `RegexSet::new`) for correct\nregex syntax."##,
5233 }, 5666 },
5234 LintCompletion { 5667 Lint {
5235 label: "clippy::invalid_upcast_comparisons", 5668 label: "clippy::invalid_upcast_comparisons",
5236 description: r##"Checks for comparisons where the relation is always either\ntrue or false, but where one side has been upcast so that the comparison is\nnecessary. Only integer types are checked."##, 5669 description: r##"Checks for comparisons where the relation is always either\ntrue or false, but where one side has been upcast so that the comparison is\nnecessary. Only integer types are checked."##,
5237 }, 5670 },
5238 LintCompletion { 5671 Lint {
5239 label: "clippy::invisible_characters", 5672 label: "clippy::invisible_characters",
5240 description: r##"Checks for invisible Unicode characters in the code."##, 5673 description: r##"Checks for invisible Unicode characters in the code."##,
5241 }, 5674 },
5242 LintCompletion { 5675 Lint {
5243 label: "clippy::items_after_statements", 5676 label: "clippy::items_after_statements",
5244 description: r##"Checks for items declared after some statement in a block."##, 5677 description: r##"Checks for items declared after some statement in a block."##,
5245 }, 5678 },
5246 LintCompletion { 5679 Lint {
5247 label: "clippy::iter_cloned_collect", 5680 label: "clippy::iter_cloned_collect",
5248 description: r##"Checks for the use of `.cloned().collect()` on slice to\ncreate a `Vec`."##, 5681 description: r##"Checks for the use of `.cloned().collect()` on slice to\ncreate a `Vec`."##,
5249 }, 5682 },
5250 LintCompletion { 5683 Lint {
5251 label: "clippy::iter_count", 5684 label: "clippy::iter_count",
5252 description: r##"Checks for the use of `.iter().count()`."##, 5685 description: r##"Checks for the use of `.iter().count()`."##,
5253 }, 5686 },
5254 LintCompletion { 5687 Lint { label: "clippy::iter_next_loop", description: r##"Checks for loops on `x.next()`."## },
5255 label: "clippy::iter_next_loop", 5688 Lint {
5256 description: r##"Checks for loops on `x.next()`."##,
5257 },
5258 LintCompletion {
5259 label: "clippy::iter_next_slice", 5689 label: "clippy::iter_next_slice",
5260 description: r##"Checks for usage of `iter().next()` on a Slice or an Array"##, 5690 description: r##"Checks for usage of `iter().next()` on a Slice or an Array"##,
5261 }, 5691 },
5262 LintCompletion { 5692 Lint {
5263 label: "clippy::iter_nth", 5693 label: "clippy::iter_nth",
5264 description: r##"Checks for use of `.iter().nth()` (and the related\n`.iter_mut().nth()`) on standard library types with O(1) element access."##, 5694 description: r##"Checks for use of `.iter().nth()` (and the related\n`.iter_mut().nth()`) on standard library types with O(1) element access."##,
5265 }, 5695 },
5266 LintCompletion { 5696 Lint {
5267 label: "clippy::iter_nth_zero", 5697 label: "clippy::iter_nth_zero",
5268 description: r##"Checks for the use of `iter.nth(0)`."##, 5698 description: r##"Checks for the use of `iter.nth(0)`."##,
5269 }, 5699 },
5270 LintCompletion { 5700 Lint {
5271 label: "clippy::iter_skip_next", 5701 label: "clippy::iter_skip_next",
5272 description: r##"Checks for use of `.skip(x).next()` on iterators."##, 5702 description: r##"Checks for use of `.skip(x).next()` on iterators."##,
5273 }, 5703 },
5274 LintCompletion { 5704 Lint {
5275 label: "clippy::iterator_step_by_zero", 5705 label: "clippy::iterator_step_by_zero",
5276 description: r##"Checks for calling `.step_by(0)` on iterators which panics."##, 5706 description: r##"Checks for calling `.step_by(0)` on iterators which panics."##,
5277 }, 5707 },
5278 LintCompletion { 5708 Lint {
5279 label: "clippy::just_underscores_and_digits", 5709 label: "clippy::just_underscores_and_digits",
5280 description: r##"Checks if you have variables whose name consists of just\nunderscores and digits."##, 5710 description: r##"Checks if you have variables whose name consists of just\nunderscores and digits."##,
5281 }, 5711 },
5282 LintCompletion { 5712 Lint {
5283 label: "clippy::large_const_arrays", 5713 label: "clippy::large_const_arrays",
5284 description: r##"Checks for large `const` arrays that should\nbe defined as `static` instead."##, 5714 description: r##"Checks for large `const` arrays that should\nbe defined as `static` instead."##,
5285 }, 5715 },
5286 LintCompletion { 5716 Lint {
5287 label: "clippy::large_digit_groups", 5717 label: "clippy::large_digit_groups",
5288 description: r##"Warns if the digits of an integral or floating-point\nconstant are grouped into groups that\nare too large."##, 5718 description: r##"Warns if the digits of an integral or floating-point\nconstant are grouped into groups that\nare too large."##,
5289 }, 5719 },
5290 LintCompletion { 5720 Lint {
5291 label: "clippy::large_enum_variant", 5721 label: "clippy::large_enum_variant",
5292 description: r##"Checks for large size differences between variants on\n`enum`s."##, 5722 description: r##"Checks for large size differences between variants on\n`enum`s."##,
5293 }, 5723 },
5294 LintCompletion { 5724 Lint {
5295 label: "clippy::large_stack_arrays", 5725 label: "clippy::large_stack_arrays",
5296 description: r##"Checks for local arrays that may be too large."##, 5726 description: r##"Checks for local arrays that may be too large."##,
5297 }, 5727 },
5298 LintCompletion { 5728 Lint {
5299 label: "clippy::large_types_passed_by_value", 5729 label: "clippy::large_types_passed_by_value",
5300 description: r##"Checks for functions taking arguments by value, where\nthe argument type is `Copy` and large enough to be worth considering\npassing by reference. Does not trigger if the function is being exported,\nbecause that might induce API breakage, if the parameter is declared as mutable,\nor if the argument is a `self`."##, 5730 description: r##"Checks for functions taking arguments by value, where\nthe argument type is `Copy` and large enough to be worth considering\npassing by reference. Does not trigger if the function is being exported,\nbecause that might induce API breakage, if the parameter is declared as mutable,\nor if the argument is a `self`."##,
5301 }, 5731 },
5302 LintCompletion { 5732 Lint {
5303 label: "clippy::len_without_is_empty", 5733 label: "clippy::len_without_is_empty",
5304 description: r##"Checks for items that implement `.len()` but not\n`.is_empty()`."##, 5734 description: r##"Checks for items that implement `.len()` but not\n`.is_empty()`."##,
5305 }, 5735 },
5306 LintCompletion { 5736 Lint {
5307 label: "clippy::len_zero", 5737 label: "clippy::len_zero",
5308 description: r##"Checks for getting the length of something via `.len()`\njust to compare to zero, and suggests using `.is_empty()` where applicable."##, 5738 description: r##"Checks for getting the length of something via `.len()`\njust to compare to zero, and suggests using `.is_empty()` where applicable."##,
5309 }, 5739 },
5310 LintCompletion { 5740 Lint {
5311 label: "clippy::let_and_return", 5741 label: "clippy::let_and_return",
5312 description: r##"Checks for `let`-bindings, which are subsequently\nreturned."##, 5742 description: r##"Checks for `let`-bindings, which are subsequently\nreturned."##,
5313 }, 5743 },
5314 LintCompletion { 5744 Lint {
5315 label: "clippy::let_underscore_drop", 5745 label: "clippy::let_underscore_drop",
5316 description: r##"Checks for `let _ = <expr>`\nwhere expr has a type that implements `Drop`"##, 5746 description: r##"Checks for `let _ = <expr>`\nwhere expr has a type that implements `Drop`"##,
5317 }, 5747 },
5318 LintCompletion { 5748 Lint {
5319 label: "clippy::let_underscore_lock", 5749 label: "clippy::let_underscore_lock",
5320 description: r##"Checks for `let _ = sync_lock`"##, 5750 description: r##"Checks for `let _ = sync_lock`"##,
5321 }, 5751 },
5322 LintCompletion { 5752 Lint {
5323 label: "clippy::let_underscore_must_use", 5753 label: "clippy::let_underscore_must_use",
5324 description: r##"Checks for `let _ = <expr>`\nwhere expr is #[must_use]"##, 5754 description: r##"Checks for `let _ = <expr>`\nwhere expr is #[must_use]"##,
5325 }, 5755 },
5326 LintCompletion { 5756 Lint { label: "clippy::let_unit_value", description: r##"Checks for binding a unit value."## },
5327 label: "clippy::let_unit_value", 5757 Lint {
5328 description: r##"Checks for binding a unit value."##,
5329 },
5330 LintCompletion {
5331 label: "clippy::linkedlist", 5758 label: "clippy::linkedlist",
5332 description: r##"Checks for usage of any `LinkedList`, suggesting to use a\n`Vec` or a `VecDeque` (formerly called `RingBuf`)."##, 5759 description: r##"Checks for usage of any `LinkedList`, suggesting to use a\n`Vec` or a `VecDeque` (formerly called `RingBuf`)."##,
5333 }, 5760 },
5334 LintCompletion { 5761 Lint {
5335 label: "clippy::logic_bug", 5762 label: "clippy::logic_bug",
5336 description: r##"Checks for boolean expressions that contain terminals that\ncan be eliminated."##, 5763 description: r##"Checks for boolean expressions that contain terminals that\ncan be eliminated."##,
5337 }, 5764 },
5338 LintCompletion { 5765 Lint {
5339 label: "clippy::lossy_float_literal", 5766 label: "clippy::lossy_float_literal",
5340 description: r##"Checks for whole number float literals that\ncannot be represented as the underlying type without loss."##, 5767 description: r##"Checks for whole number float literals that\ncannot be represented as the underlying type without loss."##,
5341 }, 5768 },
5342 LintCompletion { 5769 Lint {
5343 label: "clippy::macro_use_imports", 5770 label: "clippy::macro_use_imports",
5344 description: r##"Checks for `#[macro_use] use...`."##, 5771 description: r##"Checks for `#[macro_use] use...`."##,
5345 }, 5772 },
5346 LintCompletion { 5773 Lint {
5347 label: "clippy::main_recursion", 5774 label: "clippy::main_recursion",
5348 description: r##"Checks for recursion using the entrypoint."##, 5775 description: r##"Checks for recursion using the entrypoint."##,
5349 }, 5776 },
5350 LintCompletion { 5777 Lint {
5351 label: "clippy::manual_async_fn", 5778 label: "clippy::manual_async_fn",
5352 description: r##"It checks for manual implementations of `async` functions."##, 5779 description: r##"It checks for manual implementations of `async` functions."##,
5353 }, 5780 },
5354 LintCompletion { 5781 Lint {
5355 label: "clippy::manual_filter_map", 5782 label: "clippy::manual_filter_map",
5356 description: r##"Checks for usage of `_.filter(_).map(_)` that can be written more simply\nas `filter_map(_)`."##, 5783 description: r##"Checks for usage of `_.filter(_).map(_)` that can be written more simply\nas `filter_map(_)`."##,
5357 }, 5784 },
5358 LintCompletion { 5785 Lint {
5359 label: "clippy::manual_find_map", 5786 label: "clippy::manual_find_map",
5360 description: r##"Checks for usage of `_.find(_).map(_)` that can be written more simply\nas `find_map(_)`."##, 5787 description: r##"Checks for usage of `_.find(_).map(_)` that can be written more simply\nas `find_map(_)`."##,
5361 }, 5788 },
5362 LintCompletion { 5789 Lint {
5363 label: "clippy::manual_flatten", 5790 label: "clippy::manual_flatten",
5364 description: r##"Check for unnecessary `if let` usage in a for loop\nwhere only the `Some` or `Ok` variant of the iterator element is used."##, 5791 description: r##"Check for unnecessary `if let` usage in a for loop\nwhere only the `Some` or `Ok` variant of the iterator element is used."##,
5365 }, 5792 },
5366 LintCompletion { 5793 Lint {
5367 label: "clippy::manual_map", 5794 label: "clippy::manual_map",
5368 description: r##"Checks for usages of `match` which could be implemented using `map`"##, 5795 description: r##"Checks for usages of `match` which could be implemented using `map`"##,
5369 }, 5796 },
5370 LintCompletion { 5797 Lint {
5371 label: "clippy::manual_memcpy", 5798 label: "clippy::manual_memcpy",
5372 description: r##"Checks for for-loops that manually copy items between\nslices that could be optimized by having a memcpy."##, 5799 description: r##"Checks for for-loops that manually copy items between\nslices that could be optimized by having a memcpy."##,
5373 }, 5800 },
5374 LintCompletion { 5801 Lint {
5375 label: "clippy::manual_non_exhaustive", 5802 label: "clippy::manual_non_exhaustive",
5376 description: r##"Checks for manual implementations of the non-exhaustive pattern."##, 5803 description: r##"Checks for manual implementations of the non-exhaustive pattern."##,
5377 }, 5804 },
5378 LintCompletion { 5805 Lint {
5379 label: "clippy::manual_ok_or", 5806 label: "clippy::manual_ok_or",
5380 description: r##"Finds patterns that reimplement `Option::ok_or`."##, 5807 description: r##"Finds patterns that reimplement `Option::ok_or`."##,
5381 }, 5808 },
5382 LintCompletion { 5809 Lint {
5383 label: "clippy::manual_range_contains", 5810 label: "clippy::manual_range_contains",
5384 description: r##"Checks for expressions like `x >= 3 && x < 8` that could\nbe more readably expressed as `(3..8).contains(x)`."##, 5811 description: r##"Checks for expressions like `x >= 3 && x < 8` that could\nbe more readably expressed as `(3..8).contains(x)`."##,
5385 }, 5812 },
5386 LintCompletion { 5813 Lint {
5387 label: "clippy::manual_saturating_arithmetic", 5814 label: "clippy::manual_saturating_arithmetic",
5388 description: r##"Checks for `.checked_add/sub(x).unwrap_or(MAX/MIN)`."##, 5815 description: r##"Checks for `.checked_add/sub(x).unwrap_or(MAX/MIN)`."##,
5389 }, 5816 },
5390 LintCompletion { 5817 Lint {
5391 label: "clippy::manual_str_repeat", 5818 label: "clippy::manual_str_repeat",
5392 description: r##"Checks for manual implementations of `str::repeat`"##, 5819 description: r##"Checks for manual implementations of `str::repeat`"##,
5393 }, 5820 },
5394 LintCompletion { 5821 Lint {
5395 label: "clippy::manual_strip", 5822 label: "clippy::manual_strip",
5396 description: r##"Suggests using `strip_{prefix,suffix}` over `str::{starts,ends}_with` and slicing using\nthe pattern's length."##, 5823 description: r##"Suggests using `strip_{prefix,suffix}` over `str::{starts,ends}_with` and slicing using\nthe pattern's length."##,
5397 }, 5824 },
5398 LintCompletion { 5825 Lint { label: "clippy::manual_swap", description: r##"Checks for manual swapping."## },
5399 label: "clippy::manual_swap", 5826 Lint {
5400 description: r##"Checks for manual swapping."##,
5401 },
5402 LintCompletion {
5403 label: "clippy::manual_unwrap_or", 5827 label: "clippy::manual_unwrap_or",
5404 description: r##"Finds patterns that reimplement `Option::unwrap_or` or `Result::unwrap_or`."##, 5828 description: r##"Finds patterns that reimplement `Option::unwrap_or` or `Result::unwrap_or`."##,
5405 }, 5829 },
5406 LintCompletion { 5830 Lint {
5407 label: "clippy::many_single_char_names", 5831 label: "clippy::many_single_char_names",
5408 description: r##"Checks for too many variables whose name consists of a\nsingle character."##, 5832 description: r##"Checks for too many variables whose name consists of a\nsingle character."##,
5409 }, 5833 },
5410 LintCompletion { 5834 Lint {
5411 label: "clippy::map_clone", 5835 label: "clippy::map_clone",
5412 description: r##"Checks for usage of `map(|x| x.clone())` or\ndereferencing closures for `Copy` types, on `Iterator` or `Option`,\nand suggests `cloned()` or `copied()` instead"##, 5836 description: r##"Checks for usage of `map(|x| x.clone())` or\ndereferencing closures for `Copy` types, on `Iterator` or `Option`,\nand suggests `cloned()` or `copied()` instead"##,
5413 }, 5837 },
5414 LintCompletion { 5838 Lint {
5415 label: "clippy::map_collect_result_unit", 5839 label: "clippy::map_collect_result_unit",
5416 description: r##"Checks for usage of `_.map(_).collect::<Result<(), _>()`."##, 5840 description: r##"Checks for usage of `_.map(_).collect::<Result<(), _>()`."##,
5417 }, 5841 },
5418 LintCompletion { 5842 Lint {
5419 label: "clippy::map_entry", 5843 label: "clippy::map_entry",
5420 description: r##"Checks for uses of `contains_key` + `insert` on `HashMap`\nor `BTreeMap`."##, 5844 description: r##"Checks for uses of `contains_key` + `insert` on `HashMap`\nor `BTreeMap`."##,
5421 }, 5845 },
5422 LintCompletion { 5846 Lint {
5423 label: "clippy::map_err_ignore", 5847 label: "clippy::map_err_ignore",
5424 description: r##"Checks for instances of `map_err(|_| Some::Enum)`"##, 5848 description: r##"Checks for instances of `map_err(|_| Some::Enum)`"##,
5425 }, 5849 },
5426 LintCompletion { 5850 Lint {
5427 label: "clippy::map_flatten", 5851 label: "clippy::map_flatten",
5428 description: r##"Checks for usage of `_.map(_).flatten(_)` on `Iterator` and `Option`"##, 5852 description: r##"Checks for usage of `_.map(_).flatten(_)` on `Iterator` and `Option`"##,
5429 }, 5853 },
5430 LintCompletion { 5854 Lint {
5431 label: "clippy::map_identity", 5855 label: "clippy::map_identity",
5432 description: r##"Checks for instances of `map(f)` where `f` is the identity function."##, 5856 description: r##"Checks for instances of `map(f)` where `f` is the identity function."##,
5433 }, 5857 },
5434 LintCompletion { 5858 Lint {
5435 label: "clippy::map_unwrap_or", 5859 label: "clippy::map_unwrap_or",
5436 description: r##"Checks for usage of `option.map(_).unwrap_or(_)` or `option.map(_).unwrap_or_else(_)` or\n`result.map(_).unwrap_or_else(_)`."##, 5860 description: r##"Checks for usage of `option.map(_).unwrap_or(_)` or `option.map(_).unwrap_or_else(_)` or\n`result.map(_).unwrap_or_else(_)`."##,
5437 }, 5861 },
5438 LintCompletion { 5862 Lint {
5439 label: "clippy::match_as_ref", 5863 label: "clippy::match_as_ref",
5440 description: r##"Checks for match which is used to add a reference to an\n`Option` value."##, 5864 description: r##"Checks for match which is used to add a reference to an\n`Option` value."##,
5441 }, 5865 },
5442 LintCompletion { 5866 Lint {
5443 label: "clippy::match_bool", 5867 label: "clippy::match_bool",
5444 description: r##"Checks for matches where match expression is a `bool`. It\nsuggests to replace the expression with an `if...else` block."##, 5868 description: r##"Checks for matches where match expression is a `bool`. It\nsuggests to replace the expression with an `if...else` block."##,
5445 }, 5869 },
5446 LintCompletion { 5870 Lint {
5447 label: "clippy::match_like_matches_macro", 5871 label: "clippy::match_like_matches_macro",
5448 description: r##"Checks for `match` or `if let` expressions producing a\n`bool` that could be written using `matches!`"##, 5872 description: r##"Checks for `match` or `if let` expressions producing a\n`bool` that could be written using `matches!`"##,
5449 }, 5873 },
5450 LintCompletion { 5874 Lint {
5451 label: "clippy::match_on_vec_items", 5875 label: "clippy::match_on_vec_items",
5452 description: r##"Checks for `match vec[idx]` or `match vec[n..m]`."##, 5876 description: r##"Checks for `match vec[idx]` or `match vec[n..m]`."##,
5453 }, 5877 },
5454 LintCompletion { 5878 Lint {
5455 label: "clippy::match_overlapping_arm", 5879 label: "clippy::match_overlapping_arm",
5456 description: r##"Checks for overlapping match arms."##, 5880 description: r##"Checks for overlapping match arms."##,
5457 }, 5881 },
5458 LintCompletion { 5882 Lint {
5459 label: "clippy::match_ref_pats", 5883 label: "clippy::match_ref_pats",
5460 description: r##"Checks for matches where all arms match a reference,\nsuggesting to remove the reference and deref the matched expression\ninstead. It also checks for `if let &foo = bar` blocks."##, 5884 description: r##"Checks for matches where all arms match a reference,\nsuggesting to remove the reference and deref the matched expression\ninstead. It also checks for `if let &foo = bar` blocks."##,
5461 }, 5885 },
5462 LintCompletion { 5886 Lint {
5463 label: "clippy::match_same_arms", 5887 label: "clippy::match_same_arms",
5464 description: r##"Checks for `match` with identical arm bodies."##, 5888 description: r##"Checks for `match` with identical arm bodies."##,
5465 }, 5889 },
5466 LintCompletion { 5890 Lint {
5467 label: "clippy::match_single_binding", 5891 label: "clippy::match_single_binding",
5468 description: r##"Checks for useless match that binds to only one value."##, 5892 description: r##"Checks for useless match that binds to only one value."##,
5469 }, 5893 },
5470 LintCompletion { 5894 Lint {
5471 label: "clippy::match_wild_err_arm", 5895 label: "clippy::match_wild_err_arm",
5472 description: r##"Checks for arm which matches all errors with `Err(_)`\nand take drastic actions like `panic!`."##, 5896 description: r##"Checks for arm which matches all errors with `Err(_)`\nand take drastic actions like `panic!`."##,
5473 }, 5897 },
5474 LintCompletion { 5898 Lint {
5475 label: "clippy::match_wildcard_for_single_variants", 5899 label: "clippy::match_wildcard_for_single_variants",
5476 description: r##"Checks for wildcard enum matches for a single variant."##, 5900 description: r##"Checks for wildcard enum matches for a single variant."##,
5477 }, 5901 },
5478 LintCompletion { 5902 Lint {
5479 label: "clippy::maybe_infinite_iter", 5903 label: "clippy::maybe_infinite_iter",
5480 description: r##"Checks for iteration that may be infinite."##, 5904 description: r##"Checks for iteration that may be infinite."##,
5481 }, 5905 },
5482 LintCompletion { 5906 Lint {
5483 label: "clippy::mem_discriminant_non_enum", 5907 label: "clippy::mem_discriminant_non_enum",
5484 description: r##"Checks for calls of `mem::discriminant()` on a non-enum type."##, 5908 description: r##"Checks for calls of `mem::discriminant()` on a non-enum type."##,
5485 }, 5909 },
5486 LintCompletion { 5910 Lint {
5487 label: "clippy::mem_forget", 5911 label: "clippy::mem_forget",
5488 description: r##"Checks for usage of `std::mem::forget(t)` where `t` is\n`Drop`."##, 5912 description: r##"Checks for usage of `std::mem::forget(t)` where `t` is\n`Drop`."##,
5489 }, 5913 },
5490 LintCompletion { 5914 Lint {
5491 label: "clippy::mem_replace_option_with_none", 5915 label: "clippy::mem_replace_option_with_none",
5492 description: r##"Checks for `mem::replace()` on an `Option` with\n`None`."##, 5916 description: r##"Checks for `mem::replace()` on an `Option` with\n`None`."##,
5493 }, 5917 },
5494 LintCompletion { 5918 Lint {
5495 label: "clippy::mem_replace_with_default", 5919 label: "clippy::mem_replace_with_default",