Skip to content

Commit b495d09

Browse files
committed
Move let_underscore_drop to restriction
1 parent 4f142aa commit b495d09

File tree

5 files changed

+5
-7
lines changed

5 files changed

+5
-7
lines changed

clippy_lints/src/let_underscore.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ declare_clippy_lint! {
6262

6363
declare_clippy_lint! {
6464
/// ### What it does
65-
/// Checks for `let _ = <expr>`
66-
/// where expr has a type that implements `Drop`
65+
/// Checks for `let _ = <expr>` where expr has a type that implements `Drop`
6766
///
6867
/// ### Why is this bad?
6968
/// This statement immediately drops the initializer
@@ -94,7 +93,7 @@ declare_clippy_lint! {
9493
/// ```
9594
#[clippy::version = "1.50.0"]
9695
pub LET_UNDERSCORE_DROP,
97-
pedantic,
96+
restriction,
9897
"non-binding let on a type that implements `Drop`"
9998
}
10099

clippy_lints/src/lib.register_pedantic.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ store.register_group(true, "clippy::pedantic", Some("clippy_pedantic"), vec![
3939
LintId::of(items_after_statements::ITEMS_AFTER_STATEMENTS),
4040
LintId::of(iter_not_returning_iterator::ITER_NOT_RETURNING_ITERATOR),
4141
LintId::of(large_stack_arrays::LARGE_STACK_ARRAYS),
42-
LintId::of(let_underscore::LET_UNDERSCORE_DROP),
4342
LintId::of(literal_representation::LARGE_DIGIT_GROUPS),
4443
LintId::of(literal_representation::UNREADABLE_LITERAL),
4544
LintId::of(loops::EXPLICIT_INTO_ITER_LOOP),

clippy_lints/src/lib.register_restriction.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ store.register_group(true, "clippy::restriction", Some("clippy_restriction"), ve
2828
LintId::of(indexing_slicing::INDEXING_SLICING),
2929
LintId::of(inherent_impl::MULTIPLE_INHERENT_IMPL),
3030
LintId::of(large_include_file::LARGE_INCLUDE_FILE),
31+
LintId::of(let_underscore::LET_UNDERSCORE_DROP),
3132
LintId::of(let_underscore::LET_UNDERSCORE_MUST_USE),
3233
LintId::of(literal_representation::DECIMAL_LITERAL_REPRESENTATION),
3334
LintId::of(matches::REST_PAT_IN_FULLY_BOUND_STRUCTS),

lintcheck/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ fn main() {
678678
.unwrap();
679679

680680
let server = config.recursive.then(|| {
681-
fs::remove_dir_all("target/lintcheck/shared_target_dir/recursive").unwrap_or_default();
681+
let _ = fs::remove_dir_all("target/lintcheck/shared_target_dir/recursive");
682682

683683
LintcheckServer::spawn(recursive_options)
684684
});

src/docs/let_underscore_drop.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
### What it does
2-
Checks for `let _ = <expr>`
3-
where expr has a type that implements `Drop`
2+
Checks for `let _ = <expr>` where expr has a type that implements `Drop`
43

54
### Why is this bad?
65
This statement immediately drops the initializer

0 commit comments

Comments
 (0)