@@ -502,6 +502,46 @@ pub const DEFAULT_LINTS: &[Lint] = &[
502
502
} ,
503
503
] ;
504
504
505
+ pub const RUSTDOC_LINTS : & [ Lint ] = & [
506
+ Lint {
507
+ label : "rustdoc::all" ,
508
+ description : r##"lint group for: rustdoc::broken-intra-doc-links, rustdoc::private-intra-doc-links, rustdoc::missing-doc-code-examples, rustdoc::private-doc-tests, rustdoc::invalid-codeblock-attributes, rustdoc::invalid-rust-codeblocks, rustdoc::invalid-html-tags, rustdoc::bare-urls, rustdoc::missing-crate-level-docs"## ,
509
+ } ,
510
+ Lint { label : "rustdoc::bare_urls" , description : r##"detects URLs that are not hyperlinks"## } ,
511
+ Lint {
512
+ label : "rustdoc::broken_intra_doc_links" ,
513
+ description : r##"failures in resolving intra-doc link targets"## ,
514
+ } ,
515
+ Lint {
516
+ label : "rustdoc::invalid_codeblock_attributes" ,
517
+ description : r##"codeblock attribute looks a lot like a known one"## ,
518
+ } ,
519
+ Lint {
520
+ label : "rustdoc::invalid_html_tags" ,
521
+ description : r##"detects invalid HTML tags in doc comments"## ,
522
+ } ,
523
+ Lint {
524
+ label : "rustdoc::invalid_rust_codeblocks" ,
525
+ description : r##"codeblock could not be parsed as valid Rust or is empty"## ,
526
+ } ,
527
+ Lint {
528
+ label : "rustdoc::missing_crate_level_docs" ,
529
+ description : r##"detects crates with no crate-level documentation"## ,
530
+ } ,
531
+ Lint {
532
+ label : "rustdoc::missing_doc_code_examples" ,
533
+ description : r##"detects publicly-exported items without code samples in their documentation"## ,
534
+ } ,
535
+ Lint {
536
+ label : "rustdoc::private_doc_tests" ,
537
+ description : r##"detects code samples in docs of private items not documented by rustdoc"## ,
538
+ } ,
539
+ Lint {
540
+ label : "rustdoc::private_intra_doc_links" ,
541
+ description : r##"linking from a public item to a private one"## ,
542
+ } ,
543
+ ] ;
544
+
505
545
pub const FEATURES : & [ Lint ] = & [
506
546
Lint {
507
547
label : "abi_c_cmse_nonsecure_call" ,
@@ -5572,11 +5612,9 @@ outside ticks in documentation."##,
5572
5612
} ,
5573
5613
Lint {
5574
5614
label : "clippy::double_must_use" ,
5575
- description : r##"Checks for a [ `#[must_use]`] attribute without
5615
+ description : r##"Checks for a `#[must_use]` attribute without
5576
5616
further information on functions and methods that return a type already
5577
- marked as `#[must_use]`.
5578
-
5579
- [`#[must_use]`]: https://doc.rust-lang.org/reference/attributes/diagnostics.html#the-must_use-attribute"## ,
5617
+ marked as `#[must_use]`."## ,
5580
5618
} ,
5581
5619
Lint {
5582
5620
label : "clippy::double_neg" ,
@@ -5821,6 +5859,12 @@ derives the Copy trait"##,
5821
5859
label : "clippy::forget_ref" ,
5822
5860
description : r##"Checks for calls to `std::mem::forget` with a reference
5823
5861
instead of an owned value."## ,
5862
+ } ,
5863
+ Lint {
5864
+ label : "clippy::format_in_format_args" ,
5865
+ description : r##"Detects `format!` within the arguments of another macro that does
5866
+ formatting such as `format!` itself, `write!` or `println!`. Suggests
5867
+ inlining the `format!` call."## ,
5824
5868
} ,
5825
5869
Lint {
5826
5870
label : "clippy::from_iter_instead_of_collect" ,
@@ -6120,8 +6164,7 @@ where expr has a type that implements `Drop`"##,
6120
6164
} ,
6121
6165
Lint {
6122
6166
label : "clippy::let_underscore_must_use" ,
6123
- description : r##"Checks for `let _ = <expr>`
6124
- where expr is #[must_use]"## ,
6167
+ description : r##"Checks for `let _ = <expr>` where expr is `#[must_use]`"## ,
6125
6168
} ,
6126
6169
Lint { label : "clippy::let_unit_value" , description : r##"Checks for binding a unit value."## } ,
6127
6170
Lint {
@@ -6194,23 +6237,7 @@ be more readably expressed as `(3..8).contains(x)`."##,
6194
6237
} ,
6195
6238
Lint {
6196
6239
label : "clippy::manual_split_once" ,
6197
- description : r##"**What it does:** Checks for usages of `str::splitn(2, _)`
6198
-
6199
- **Why is this bad?** `split_once` is both clearer in intent and slightly more efficient.
6200
-
6201
- **Known problems:** None.
6202
-
6203
- **Example:**
6204
-
6205
- ```rust
6206
- // Bad
6207
- let (key, value) = _.splitn(2, '=').next_tuple()?;
6208
- let value = _.splitn(2, '=').nth(1)?;
6209
-
6210
- // Good
6211
- let (key, value) = _.split_once('=')?;
6212
- let value = _.split_once('=')?.1;
6213
- ```"## ,
6240
+ description : r##"Checks for usages of `str::splitn(2, _)`"## ,
6214
6241
} ,
6215
6242
Lint {
6216
6243
label : "clippy::manual_str_repeat" ,
@@ -6304,6 +6331,10 @@ instead. It also checks for `if let &foo = bar` blocks."##,
6304
6331
label : "clippy::match_single_binding" ,
6305
6332
description : r##"Checks for useless match that binds to only one value."## ,
6306
6333
} ,
6334
+ Lint {
6335
+ label : "clippy::match_str_case_mismatch" ,
6336
+ description : r##"Checks for `match` expressions modifying the case of a string with non-compliant arms"## ,
6337
+ } ,
6307
6338
Lint {
6308
6339
label : "clippy::match_wild_err_arm" ,
6309
6340
description : r##"Checks for arm which matches all errors with `Err(_)`
@@ -6433,17 +6464,13 @@ used."##,
6433
6464
Lint {
6434
6465
label : "clippy::must_use_candidate" ,
6435
6466
description : r##"Checks for public functions that have no
6436
- [`#[must_use]`] attribute, but return something not already marked
6437
- must-use, have no mutable arg and mutate no statics.
6438
-
6439
- [`#[must_use]`]: https://doc.rust-lang.org/reference/attributes/diagnostics.html#the-must_use-attribute"## ,
6467
+ `#[must_use]` attribute, but return something not already marked
6468
+ must-use, have no mutable arg and mutate no statics."## ,
6440
6469
} ,
6441
6470
Lint {
6442
6471
label : "clippy::must_use_unit" ,
6443
- description : r##"Checks for a [`#[must_use]`] attribute on
6444
- unit-returning functions and methods.
6445
-
6446
- [`#[must_use]`]: https://doc.rust-lang.org/reference/attributes/diagnostics.html#the-must_use-attribute"## ,
6472
+ description : r##"Checks for a `#[must_use]` attribute on
6473
+ unit-returning functions and methods."## ,
6447
6474
} ,
6448
6475
Lint {
6449
6476
label : "clippy::mut_from_ref" ,
@@ -6591,6 +6618,10 @@ implementation of
6591
6618
label : "clippy::no_effect" ,
6592
6619
description : r##"Checks for statements which have no effect."## ,
6593
6620
} ,
6621
+ Lint {
6622
+ label : "clippy::no_effect_underscore_binding" ,
6623
+ description : r##"Checks for binding to underscore prefixed variable without side-effects."## ,
6624
+ } ,
6594
6625
Lint {
6595
6626
label : "clippy::non_ascii_literal" ,
6596
6627
description : r##"Checks for non-ASCII characters in string literals."## ,
@@ -7155,6 +7186,12 @@ assign a value in it."##,
7155
7186
label : "clippy::to_string_in_display" ,
7156
7187
description : r##"Checks for uses of `to_string()` in `Display` traits."## ,
7157
7188
} ,
7189
+ Lint {
7190
+ label : "clippy::to_string_in_format_args" ,
7191
+ description : r##"Checks for [`ToString::to_string`](https://doc.rust-lang.org/std/string/trait.ToString.html#tymethod.to_string)
7192
+ applied to a type that implements [`Display`](https://doc.rust-lang.org/std/fmt/trait.Display.html)
7193
+ in a macro that does formatting."## ,
7194
+ } ,
7158
7195
Lint { label : "clippy::todo" , description : r##"Checks for usage of `todo!`."## } ,
7159
7196
Lint {
7160
7197
label : "clippy::too_many_arguments" ,
@@ -7194,6 +7231,7 @@ syntax specifications for trait bounds are used simultaneously."##,
7194
7231
label : "clippy::transmute_int_to_float" ,
7195
7232
description : r##"Checks for transmutes from an integer to a float."## ,
7196
7233
} ,
7234
+ Lint { label : "clippy::transmute_num_to_bytes" , description : r##""## } ,
7197
7235
Lint {
7198
7236
label : "clippy::transmute_ptr_to_ptr" ,
7199
7237
description : r##"Checks for transmutes from a pointer to a pointer, or
@@ -7256,6 +7294,12 @@ that is not equal to its
7256
7294
label : "clippy::uninit_assumed_init" ,
7257
7295
description : r##"Checks for `MaybeUninit::uninit().assume_init()`."## ,
7258
7296
} ,
7297
+ Lint {
7298
+ label : "clippy::uninit_vec" ,
7299
+ description : r##"Checks for `set_len()` call that creates `Vec` with uninitialized elements.
7300
+ This is commonly caused by calling `set_len()` right after allocating or
7301
+ reserving a buffer with `new()`, `default()`, `with_capacity()`, or `reserve()`."## ,
7302
+ } ,
7259
7303
Lint {
7260
7304
label : "clippy::unit_arg" ,
7261
7305
description : r##"Checks for passing a unit value as an argument to a function without using a
0 commit comments