Skip to content

Commit

Permalink
Auto merge of #6111 - flip1995:rustup, r=flip1995
Browse files Browse the repository at this point in the history
Rustup

r? `@ghost`

changelog: Deprecate [`drop_bounds`] lint. This lint was uplifted to rustc with the same name.
  • Loading branch information
bors committed Oct 4, 2020
2 parents 9408c68 + 840f7da commit 2ed5143
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 111 deletions.
9 changes: 9 additions & 0 deletions clippy_lints/src/deprecated_lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,12 @@ declare_deprecated_lint! {
pub REGEX_MACRO,
"the regex! macro has been removed from the regex crate in 2018"
}

declare_deprecated_lint! {
/// **What it does:** Nothing. This lint has been deprecated.
///
/// **Deprecation reason:** This lint has been uplifted to rustc and is now called
/// `drop_bounds`.
pub DROP_BOUNDS,
"this lint has been uplifted to rustc and is now called `drop_bounds`"
}
73 changes: 0 additions & 73 deletions clippy_lints/src/drop_bounds.rs

This file was deleted.

9 changes: 4 additions & 5 deletions clippy_lints/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ mod disallowed_method;
mod doc;
mod double_comparison;
mod double_parens;
mod drop_bounds;
mod drop_forget_ref;
mod duration_subsec;
mod else_if_without_else;
Expand Down Expand Up @@ -480,6 +479,10 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
"clippy::regex_macro",
"the regex! macro has been removed from the regex crate in 2018",
);
store.register_removed(
"clippy::drop_bounds",
"this lint has been uplifted to rustc and is now called `drop_bounds`",
);
// end deprecated lints, do not remove this comment, it’s used in `update_lints`

// begin register lints, do not remove this comment, it’s used in `update_lints`
Expand Down Expand Up @@ -537,7 +540,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
&doc::NEEDLESS_DOCTEST_MAIN,
&double_comparison::DOUBLE_COMPARISONS,
&double_parens::DOUBLE_PARENS,
&drop_bounds::DROP_BOUNDS,
&drop_forget_ref::DROP_COPY,
&drop_forget_ref::DROP_REF,
&drop_forget_ref::FORGET_COPY,
Expand Down Expand Up @@ -964,7 +966,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
store.register_late_pass(|| box strings::StringLitAsBytes);
store.register_late_pass(|| box derive::Derive);
store.register_late_pass(|| box types::CharLitAsU8);
store.register_late_pass(|| box drop_bounds::DropBounds);
store.register_late_pass(|| box get_last_with_len::GetLastWithLen);
store.register_late_pass(|| box drop_forget_ref::DropForgetRef);
store.register_late_pass(|| box empty_enum::EmptyEnum);
Expand Down Expand Up @@ -1294,7 +1295,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
LintId::of(&doc::NEEDLESS_DOCTEST_MAIN),
LintId::of(&double_comparison::DOUBLE_COMPARISONS),
LintId::of(&double_parens::DOUBLE_PARENS),
LintId::of(&drop_bounds::DROP_BOUNDS),
LintId::of(&drop_forget_ref::DROP_COPY),
LintId::of(&drop_forget_ref::DROP_REF),
LintId::of(&drop_forget_ref::FORGET_COPY),
Expand Down Expand Up @@ -1728,7 +1728,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
LintId::of(&copies::IF_SAME_THEN_ELSE),
LintId::of(&derive::DERIVE_HASH_XOR_EQ),
LintId::of(&derive::DERIVE_ORD_XOR_PARTIAL_ORD),
LintId::of(&drop_bounds::DROP_BOUNDS),
LintId::of(&drop_forget_ref::DROP_COPY),
LintId::of(&drop_forget_ref::DROP_REF),
LintId::of(&drop_forget_ref::FORGET_COPY),
Expand Down
1 change: 0 additions & 1 deletion clippy_lints/src/utils/paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ pub const DISPLAY_FMT_METHOD: [&str; 4] = ["core", "fmt", "Display", "fmt"];
pub const DISPLAY_TRAIT: [&str; 3] = ["core", "fmt", "Display"];
pub const DOUBLE_ENDED_ITERATOR: [&str; 4] = ["core", "iter", "traits", "DoubleEndedIterator"];
pub const DROP: [&str; 3] = ["core", "mem", "drop"];
pub const DROP_TRAIT: [&str; 4] = ["core", "ops", "drop", "Drop"];
pub const DURATION: [&str; 3] = ["core", "time", "Duration"];
pub const EARLY_CONTEXT: [&str; 4] = ["rustc", "lint", "context", "EarlyContext"];
pub const EXIT: [&str; 3] = ["std", "process", "exit"];
Expand Down
7 changes: 0 additions & 7 deletions src/lintlist/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,13 +430,6 @@ pub static ref ALL_LINTS: Vec<Lint> = vec![
deprecation: None,
module: "double_parens",
},
Lint {
name: "drop_bounds",
group: "correctness",
desc: "bounds of the form `T: Drop` are useless",
deprecation: None,
module: "drop_bounds",
},
Lint {
name: "drop_copy",
group: "correctness",
Expand Down
1 change: 1 addition & 0 deletions tests/ui/deprecated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
#[warn(clippy::into_iter_on_array)]
#[warn(clippy::unused_label)]
#[warn(clippy::regex_macro)]
#[warn(clippy::drop_bounds)]

fn main() {}
8 changes: 7 additions & 1 deletion tests/ui/deprecated.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,17 @@ error: lint `clippy::regex_macro` has been removed: `the regex! macro has been r
LL | #[warn(clippy::regex_macro)]
| ^^^^^^^^^^^^^^^^^^^

error: lint `clippy::drop_bounds` has been removed: `this lint has been uplifted to rustc and is now called `drop_bounds``
--> $DIR/deprecated.rs:11:8
|
LL | #[warn(clippy::drop_bounds)]
| ^^^^^^^^^^^^^^^^^^^

error: lint `clippy::str_to_string` has been removed: `using `str::to_string` is common even today and specialization will likely happen soon`
--> $DIR/deprecated.rs:1:8
|
LL | #[warn(clippy::str_to_string)]
| ^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 11 previous errors
error: aborting due to 12 previous errors

8 changes: 0 additions & 8 deletions tests/ui/drop_bounds.rs

This file was deleted.

16 changes: 0 additions & 16 deletions tests/ui/drop_bounds.stderr

This file was deleted.

0 comments on commit 2ed5143

Please sign in to comment.