1 macro_rules! declare_deprecated_lint {
2 (pub $name: ident, $_reason: expr) => {
3 declare_lint!(pub $name, Allow, "deprecated lint")
8 /// **What it does:** Nothing. This lint has been deprecated.
10 /// **Deprecation reason:** This used to check for `Vec::extend`, which was slower than
11 /// `Vec::extend_from_slice`. Thanks to specialization, this is no longer true.
12 declare_deprecated_lint! {
13 pub EXTEND_FROM_SLICE,
14 "`.extend_from_slice(_)` is a faster way to extend a Vec by a slice"
18 /// **What it does:** Nothing. This lint has been deprecated.
20 /// **Deprecation reason:** This used to check for `Vec::as_slice`, which was unstable with good
21 /// stable alternatives. `Vec::as_slice` has now been stabilized.
22 declare_deprecated_lint! {
23 pub UNSTABLE_AS_SLICE,
24 "`Vec::as_slice` has been stabilized in 1.7"
28 /// **What it does:** Nothing. This lint has been deprecated.
30 /// **Deprecation reason:** This used to check for `Vec::as_mut_slice`, which was unstable with good
31 /// stable alternatives. `Vec::as_mut_slice` has now been stabilized.
32 declare_deprecated_lint! {
33 pub UNSTABLE_AS_MUT_SLICE,
34 "`Vec::as_mut_slice` has been stabilized in 1.7"
37 /// **What it does:** Nothing. This lint has been deprecated.
39 /// **Deprecation reason:** This used to check for `.to_string()` method calls on values
40 /// of type `&str`. This is not unidiomatic and with specialization coming, `to_string` could be
41 /// specialized to be as efficient as `to_owned`.
42 declare_deprecated_lint! {
44 "using `str::to_string` is common even today and specialization will likely happen soon"
47 /// **What it does:** Nothing. This lint has been deprecated.
49 /// **Deprecation reason:** This used to check for `.to_string()` method calls on values
50 /// of type `String`. This is not unidiomatic and with specialization coming, `to_string` could be
51 /// specialized to be as efficient as `clone`.
52 declare_deprecated_lint! {
54 "using `string::to_string` is common even today and specialization will likely happen soon"