1 macro_rules! declare_deprecated_lint {
2 (pub $name: ident, $_reason: expr) => {
3 declare_lint!(pub $name, Allow, "deprecated lint")
7 /// **What it does:** Nothing. This lint has been deprecated.
9 /// **Deprecation reason:** This used to check for `Vec::as_slice`, which was unstable with good
10 /// stable alternatives. `Vec::as_slice` has now been stabilized.
11 declare_deprecated_lint! {
12 pub UNSTABLE_AS_SLICE,
13 "`Vec::as_slice` has been stabilized in 1.7"
17 /// **What it does:** Nothing. This lint has been deprecated.
19 /// **Deprecation reason:** This used to check for `Vec::as_mut_slice`, which was unstable with good
20 /// stable alternatives. `Vec::as_mut_slice` has now been stabilized.
21 declare_deprecated_lint! {
22 pub UNSTABLE_AS_MUT_SLICE,
23 "`Vec::as_mut_slice` has been stabilized in 1.7"
26 /// **What it does:** Nothing. This lint has been deprecated.
28 /// **Deprecation reason:** This used to check for `.to_string()` method calls on values
29 /// of type `&str`. This is not unidiomatic and with specialization coming, `to_string` could be
30 /// specialized to be as efficient as `to_owned`.
31 declare_deprecated_lint! {
33 "using `str::to_string` is common even today and specialization will likely happen soon"
36 /// **What it does:** Nothing. This lint has been deprecated.
38 /// **Deprecation reason:** This used to check for `.to_string()` method calls on values
39 /// of type `String`. This is not unidiomatic and with specialization coming, `to_string` could be
40 /// specialized to be as efficient as `clone`.
41 declare_deprecated_lint! {
43 "using `string::to_string` is common even today and specialization will likely happen soon"