@@ -4,85 +4,85 @@ macro_rules! declare_deprecated_lint {
4
4
}
5
5
}
6
6
7
+ declare_deprecated_lint ! {
7
8
/// **What it does:** Nothing. This lint has been deprecated.
8
9
///
9
10
/// **Deprecation reason:** This used to check for `assert!(a == b)` and recommend
10
11
/// replacement with `assert_eq!(a, b)`, but this is no longer needed after RFC 2011.
11
- declare_deprecated_lint ! {
12
12
pub SHOULD_ASSERT_EQ ,
13
13
"`assert!()` will be more flexible with RFC 2011"
14
14
}
15
15
16
+ declare_deprecated_lint ! {
16
17
/// **What it does:** Nothing. This lint has been deprecated.
17
18
///
18
19
/// **Deprecation reason:** This used to check for `Vec::extend`, which was slower than
19
20
/// `Vec::extend_from_slice`. Thanks to specialization, this is no longer true.
20
- declare_deprecated_lint ! {
21
21
pub EXTEND_FROM_SLICE ,
22
22
"`.extend_from_slice(_)` is a faster way to extend a Vec by a slice"
23
23
}
24
24
25
+ declare_deprecated_lint ! {
25
26
/// **What it does:** Nothing. This lint has been deprecated.
26
27
///
27
28
/// **Deprecation reason:** `Range::step_by(0)` used to be linted since it's
28
29
/// an infinite iterator, which is better expressed by `iter::repeat`,
29
30
/// but the method has been removed for `Iterator::step_by` which panics
30
31
/// if given a zero
31
- declare_deprecated_lint ! {
32
32
pub RANGE_STEP_BY_ZERO ,
33
33
"`iterator.step_by(0)` panics nowadays"
34
34
}
35
35
36
+ declare_deprecated_lint ! {
36
37
/// **What it does:** Nothing. This lint has been deprecated.
37
38
///
38
39
/// **Deprecation reason:** This used to check for `Vec::as_slice`, which was unstable with good
39
40
/// stable alternatives. `Vec::as_slice` has now been stabilized.
40
- declare_deprecated_lint ! {
41
41
pub UNSTABLE_AS_SLICE ,
42
42
"`Vec::as_slice` has been stabilized in 1.7"
43
43
}
44
44
45
-
45
+ declare_deprecated_lint ! {
46
46
/// **What it does:** Nothing. This lint has been deprecated.
47
47
///
48
48
/// **Deprecation reason:** This used to check for `Vec::as_mut_slice`, which was unstable with good
49
49
/// stable alternatives. `Vec::as_mut_slice` has now been stabilized.
50
- declare_deprecated_lint ! {
51
50
pub UNSTABLE_AS_MUT_SLICE ,
52
51
"`Vec::as_mut_slice` has been stabilized in 1.7"
53
52
}
54
53
54
+ declare_deprecated_lint ! {
55
55
/// **What it does:** Nothing. This lint has been deprecated.
56
56
///
57
57
/// **Deprecation reason:** This used to check for `.to_string()` method calls on values
58
58
/// of type `&str`. This is not unidiomatic and with specialization coming, `to_string` could be
59
59
/// specialized to be as efficient as `to_owned`.
60
- declare_deprecated_lint ! {
61
60
pub STR_TO_STRING ,
62
61
"using `str::to_string` is common even today and specialization will likely happen soon"
63
62
}
64
63
64
+ declare_deprecated_lint ! {
65
65
/// **What it does:** Nothing. This lint has been deprecated.
66
66
///
67
67
/// **Deprecation reason:** This used to check for `.to_string()` method calls on values
68
68
/// of type `String`. This is not unidiomatic and with specialization coming, `to_string` could be
69
69
/// specialized to be as efficient as `clone`.
70
- declare_deprecated_lint ! {
71
70
pub STRING_TO_STRING ,
72
71
"using `string::to_string` is common even today and specialization will likely happen soon"
73
72
}
74
73
74
+ declare_deprecated_lint ! {
75
75
/// **What it does:** Nothing. This lint has been deprecated.
76
76
///
77
77
/// **Deprecation reason:** This lint should never have applied to non-pointer types, as transmuting
78
78
/// between non-pointer types of differing alignment is well-defined behavior (it's semantically
79
79
/// equivalent to a memcpy). This lint has thus been refactored into two separate lints:
80
80
/// cast_ptr_alignment and transmute_ptr_to_ptr.
81
- declare_deprecated_lint ! {
82
81
pub MISALIGNED_TRANSMUTE ,
83
82
"this lint has been split into cast_ptr_alignment and transmute_ptr_to_ptr"
84
83
}
85
84
85
+ declare_deprecated_lint ! {
86
86
/// **What it does:** Nothing. This lint has been deprecated.
87
87
///
88
88
/// **Deprecation reason:** This lint is too subjective, not having a good reason for being in clippy.
@@ -93,40 +93,40 @@ declare_deprecated_lint! {
93
93
"using compound assignment operators (e.g., `+=`) is harmless"
94
94
}
95
95
96
+ declare_deprecated_lint! {
96
97
/// **What it does:** Nothing. This lint has been deprecated.
97
98
///
98
99
/// **Deprecation reason:** The original rule will only lint for `if let`. After
99
100
/// making it support to lint `match`, naming as `if let` is not suitable for it.
100
101
/// So, this lint is deprecated.
101
- declare_deprecated_lint ! {
102
102
pub IF_LET_REDUNDANT_PATTERN_MATCHING ,
103
103
"this lint has been changed to redundant_pattern_matching"
104
104
}
105
105
106
+ declare_deprecated_lint! {
106
107
/// **What it does:** Nothing. This lint has been deprecated.
107
108
///
108
109
/// **Deprecation reason:** This lint used to suggest replacing `let mut vec =
109
110
/// Vec::with_capacity(n); vec.set_len(n);` with `let vec = vec![0; n];`. The
110
111
/// replacement has very different performance characteristics so the lint is
111
112
/// deprecated.
112
- declare_deprecated_lint ! {
113
113
pub UNSAFE_VECTOR_INITIALIZATION ,
114
114
"the replacement suggested by this lint had substantially different behavior"
115
115
}
116
116
117
+ declare_deprecated_lint! {
117
118
/// **What it does:** Nothing. This lint has been deprecated.
118
119
///
119
120
/// **Deprecation reason:** This lint has been superseded by the warn-by-default
120
121
/// `invalid_value` rustc lint.
121
- declare_deprecated_lint ! {
122
122
pub INVALID_REF ,
123
123
"superseded by rustc lint `invalid_value`"
124
124
}
125
125
126
+ declare_deprecated_lint! {
126
127
/// **What it does:** Nothing. This lint has been deprecated.
127
128
///
128
129
/// **Deprecation reason:** This lint has been superseded by #[must_use] in rustc.
129
- declare_deprecated_lint ! {
130
130
pub UNUSED_COLLECT ,
131
131
"`collect` has been marked as #[must_use] in rustc and that covers all cases of this lint"
132
132
}
0 commit comments