Skip to content

Commit 2ed5143

Browse files
committed
Auto merge of #6111 - flip1995:rustup, r=flip1995
Rustup r? `@ghost` changelog: Deprecate [`drop_bounds`] lint. This lint was uplifted to rustc with the same name.
2 parents 9408c68 + 840f7da commit 2ed5143

File tree

9 files changed

+21
-111
lines changed

9 files changed

+21
-111
lines changed

clippy_lints/src/deprecated_lints.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,3 +163,12 @@ declare_deprecated_lint! {
163163
pub REGEX_MACRO,
164164
"the regex! macro has been removed from the regex crate in 2018"
165165
}
166+
167+
declare_deprecated_lint! {
168+
/// **What it does:** Nothing. This lint has been deprecated.
169+
///
170+
/// **Deprecation reason:** This lint has been uplifted to rustc and is now called
171+
/// `drop_bounds`.
172+
pub DROP_BOUNDS,
173+
"this lint has been uplifted to rustc and is now called `drop_bounds`"
174+
}

clippy_lints/src/drop_bounds.rs

Lines changed: 0 additions & 73 deletions
This file was deleted.

clippy_lints/src/lib.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ mod disallowed_method;
181181
mod doc;
182182
mod double_comparison;
183183
mod double_parens;
184-
mod drop_bounds;
185184
mod drop_forget_ref;
186185
mod duration_subsec;
187186
mod else_if_without_else;
@@ -480,6 +479,10 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
480479
"clippy::regex_macro",
481480
"the regex! macro has been removed from the regex crate in 2018",
482481
);
482+
store.register_removed(
483+
"clippy::drop_bounds",
484+
"this lint has been uplifted to rustc and is now called `drop_bounds`",
485+
);
483486
// end deprecated lints, do not remove this comment, it’s used in `update_lints`
484487

485488
// begin register lints, do not remove this comment, it’s used in `update_lints`
@@ -537,7 +540,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
537540
&doc::NEEDLESS_DOCTEST_MAIN,
538541
&double_comparison::DOUBLE_COMPARISONS,
539542
&double_parens::DOUBLE_PARENS,
540-
&drop_bounds::DROP_BOUNDS,
541543
&drop_forget_ref::DROP_COPY,
542544
&drop_forget_ref::DROP_REF,
543545
&drop_forget_ref::FORGET_COPY,
@@ -964,7 +966,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
964966
store.register_late_pass(|| box strings::StringLitAsBytes);
965967
store.register_late_pass(|| box derive::Derive);
966968
store.register_late_pass(|| box types::CharLitAsU8);
967-
store.register_late_pass(|| box drop_bounds::DropBounds);
968969
store.register_late_pass(|| box get_last_with_len::GetLastWithLen);
969970
store.register_late_pass(|| box drop_forget_ref::DropForgetRef);
970971
store.register_late_pass(|| box empty_enum::EmptyEnum);
@@ -1294,7 +1295,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
12941295
LintId::of(&doc::NEEDLESS_DOCTEST_MAIN),
12951296
LintId::of(&double_comparison::DOUBLE_COMPARISONS),
12961297
LintId::of(&double_parens::DOUBLE_PARENS),
1297-
LintId::of(&drop_bounds::DROP_BOUNDS),
12981298
LintId::of(&drop_forget_ref::DROP_COPY),
12991299
LintId::of(&drop_forget_ref::DROP_REF),
13001300
LintId::of(&drop_forget_ref::FORGET_COPY),
@@ -1728,7 +1728,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
17281728
LintId::of(&copies::IF_SAME_THEN_ELSE),
17291729
LintId::of(&derive::DERIVE_HASH_XOR_EQ),
17301730
LintId::of(&derive::DERIVE_ORD_XOR_PARTIAL_ORD),
1731-
LintId::of(&drop_bounds::DROP_BOUNDS),
17321731
LintId::of(&drop_forget_ref::DROP_COPY),
17331732
LintId::of(&drop_forget_ref::DROP_REF),
17341733
LintId::of(&drop_forget_ref::FORGET_COPY),

clippy_lints/src/utils/paths.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ pub const DISPLAY_FMT_METHOD: [&str; 4] = ["core", "fmt", "Display", "fmt"];
3131
pub const DISPLAY_TRAIT: [&str; 3] = ["core", "fmt", "Display"];
3232
pub const DOUBLE_ENDED_ITERATOR: [&str; 4] = ["core", "iter", "traits", "DoubleEndedIterator"];
3333
pub const DROP: [&str; 3] = ["core", "mem", "drop"];
34-
pub const DROP_TRAIT: [&str; 4] = ["core", "ops", "drop", "Drop"];
3534
pub const DURATION: [&str; 3] = ["core", "time", "Duration"];
3635
pub const EARLY_CONTEXT: [&str; 4] = ["rustc", "lint", "context", "EarlyContext"];
3736
pub const EXIT: [&str; 3] = ["std", "process", "exit"];

src/lintlist/mod.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -430,13 +430,6 @@ pub static ref ALL_LINTS: Vec<Lint> = vec![
430430
deprecation: None,
431431
module: "double_parens",
432432
},
433-
Lint {
434-
name: "drop_bounds",
435-
group: "correctness",
436-
desc: "bounds of the form `T: Drop` are useless",
437-
deprecation: None,
438-
module: "drop_bounds",
439-
},
440433
Lint {
441434
name: "drop_copy",
442435
group: "correctness",

tests/ui/deprecated.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
#[warn(clippy::into_iter_on_array)]
99
#[warn(clippy::unused_label)]
1010
#[warn(clippy::regex_macro)]
11+
#[warn(clippy::drop_bounds)]
1112

1213
fn main() {}

tests/ui/deprecated.stderr

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,17 @@ error: lint `clippy::regex_macro` has been removed: `the regex! macro has been r
6060
LL | #[warn(clippy::regex_macro)]
6161
| ^^^^^^^^^^^^^^^^^^^
6262

63+
error: lint `clippy::drop_bounds` has been removed: `this lint has been uplifted to rustc and is now called `drop_bounds``
64+
--> $DIR/deprecated.rs:11:8
65+
|
66+
LL | #[warn(clippy::drop_bounds)]
67+
| ^^^^^^^^^^^^^^^^^^^
68+
6369
error: lint `clippy::str_to_string` has been removed: `using `str::to_string` is common even today and specialization will likely happen soon`
6470
--> $DIR/deprecated.rs:1:8
6571
|
6672
LL | #[warn(clippy::str_to_string)]
6773
| ^^^^^^^^^^^^^^^^^^^^^
6874

69-
error: aborting due to 11 previous errors
75+
error: aborting due to 12 previous errors
7076

tests/ui/drop_bounds.rs

Lines changed: 0 additions & 8 deletions
This file was deleted.

tests/ui/drop_bounds.stderr

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)