Deprecate temporary_cstr_as_ptr

This commit is contained in:
Eduardo Broto 2020-10-28 22:32:13 +01:00
parent c42a22d2dc
commit a50d9e7af6
5 changed files with 22 additions and 1 deletions

View File

@ -1962,6 +1962,7 @@ Released 2018-09-13
[`suspicious_unary_op_formatting`]: https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_unary_op_formatting [`suspicious_unary_op_formatting`]: https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_unary_op_formatting
[`tabs_in_doc_comments`]: https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [`tabs_in_doc_comments`]: https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments
[`temporary_assignment`]: https://rust-lang.github.io/rust-clippy/master/index.html#temporary_assignment [`temporary_assignment`]: https://rust-lang.github.io/rust-clippy/master/index.html#temporary_assignment
[`temporary_cstring_as_ptr`]: https://rust-lang.github.io/rust-clippy/master/index.html#temporary_cstring_as_ptr
[`to_digit_is_some`]: https://rust-lang.github.io/rust-clippy/master/index.html#to_digit_is_some [`to_digit_is_some`]: https://rust-lang.github.io/rust-clippy/master/index.html#to_digit_is_some
[`to_string_in_display`]: https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_display [`to_string_in_display`]: https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_display
[`todo`]: https://rust-lang.github.io/rust-clippy/master/index.html#todo [`todo`]: https://rust-lang.github.io/rust-clippy/master/index.html#todo

View File

@ -172,3 +172,12 @@ declare_deprecated_lint! {
pub DROP_BOUNDS, pub DROP_BOUNDS,
"this lint has been uplifted to rustc and is now called `drop_bounds`" "this lint has been uplifted to rustc and is now called `drop_bounds`"
} }
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
/// `temporary_cstring_as_ptr`.
pub TEMPORARY_CSTRING_AS_PTR,
"this lint has been uplifted to rustc and is now called `temporary_cstring_as_ptr`"
}

View File

@ -488,6 +488,10 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
"clippy::drop_bounds", "clippy::drop_bounds",
"this lint has been uplifted to rustc and is now called `drop_bounds`", "this lint has been uplifted to rustc and is now called `drop_bounds`",
); );
store.register_removed(
"clippy::temporary_cstring_as_ptr",
"this lint has been uplifted to rustc and is now called `temporary_cstring_as_ptr`",
);
// end deprecated lints, do not remove this comment, its used in `update_lints` // end deprecated lints, do not remove this comment, its used in `update_lints`
// begin register lints, do not remove this comment, its used in `update_lints` // begin register lints, do not remove this comment, its used in `update_lints`

View File

@ -9,5 +9,6 @@
#[warn(clippy::unused_label)] #[warn(clippy::unused_label)]
#[warn(clippy::regex_macro)] #[warn(clippy::regex_macro)]
#[warn(clippy::drop_bounds)] #[warn(clippy::drop_bounds)]
#[warn(clippy::temporary_cstring_as_ptr)]
fn main() {} fn main() {}

View File

@ -66,11 +66,17 @@ error: lint `clippy::drop_bounds` has been removed: `this lint has been uplifted
LL | #[warn(clippy::drop_bounds)] LL | #[warn(clippy::drop_bounds)]
| ^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^
error: lint `clippy::temporary_cstring_as_ptr` has been removed: `this lint has been uplifted to rustc and is now called `temporary_cstring_as_ptr``
--> $DIR/deprecated.rs:12:8
|
LL | #[warn(clippy::temporary_cstring_as_ptr)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: lint `clippy::str_to_string` has been removed: `using `str::to_string` is common even today and specialization will likely happen soon` 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 --> $DIR/deprecated.rs:1:8
| |
LL | #[warn(clippy::str_to_string)] LL | #[warn(clippy::str_to_string)]
| ^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 12 previous errors error: aborting due to 13 previous errors