Skip to content

Commit d72dfbc

Browse files
committed
deprecate invalid_ref lint
1 parent c55d38e commit d72dfbc

File tree

6 files changed

+9
-162
lines changed

6 files changed

+9
-162
lines changed

clippy_lints/src/deprecated_lints.rs

+9
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,12 @@ declare_deprecated_lint! {
113113
pub UNSAFE_VECTOR_INITIALIZATION,
114114
"the replacement suggested by this lint had substantially different behavior"
115115
}
116+
117+
/// **What it does:** Nothing. This lint has been deprecated.
118+
///
119+
/// **Deprecation reason:** This lint has been superseded by the `invalid_value`
120+
/// rustc lint.
121+
declare_clippy_lint! {
122+
pub INVALID_REF,
123+
"superseded by rustc lint `invalid_value`"
124+
}

clippy_lints/src/invalid_ref.rs

-55
This file was deleted.

clippy_lints/src/lib.rs

-4
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ pub mod inherent_to_string;
200200
pub mod inline_fn_without_body;
201201
pub mod int_plus_one;
202202
pub mod integer_division;
203-
pub mod invalid_ref;
204203
pub mod items_after_statements;
205204
pub mod large_enum_variant;
206205
pub mod len_zero;
@@ -558,7 +557,6 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
558557
reg.register_late_lint_pass(box bytecount::ByteCount);
559558
reg.register_late_lint_pass(box infinite_iter::InfiniteIter);
560559
reg.register_late_lint_pass(box inline_fn_without_body::InlineFnWithoutBody);
561-
reg.register_late_lint_pass(box invalid_ref::InvalidRef);
562560
reg.register_late_lint_pass(box identity_conversion::IdentityConversion::default());
563561
reg.register_late_lint_pass(box types::ImplicitHasher);
564562
reg.register_early_lint_pass(box redundant_static_lifetimes::RedundantStaticLifetimes);
@@ -736,7 +734,6 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
736734
inherent_to_string::INHERENT_TO_STRING_SHADOW_DISPLAY,
737735
inline_fn_without_body::INLINE_FN_WITHOUT_BODY,
738736
int_plus_one::INT_PLUS_ONE,
739-
invalid_ref::INVALID_REF,
740737
large_enum_variant::LARGE_ENUM_VARIANT,
741738
len_zero::LEN_WITHOUT_IS_EMPTY,
742739
len_zero::LEN_ZERO,
@@ -1094,7 +1091,6 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
10941091
infinite_iter::INFINITE_ITER,
10951092
inherent_to_string::INHERENT_TO_STRING_SHADOW_DISPLAY,
10961093
inline_fn_without_body::INLINE_FN_WITHOUT_BODY,
1097-
invalid_ref::INVALID_REF,
10981094
literal_representation::MISTYPED_LITERAL_SUFFIXES,
10991095
loops::FOR_LOOP_OVER_OPTION,
11001096
loops::FOR_LOOP_OVER_RESULT,

clippy_lints/src/utils/paths.rs

-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ pub const HASHMAP_ENTRY: [&str; 5] = ["std", "collections", "hash", "map", "Entr
3737
pub const HASHSET: [&str; 5] = ["std", "collections", "hash", "set", "HashSet"];
3838
pub const INDEX: [&str; 3] = ["core", "ops", "Index"];
3939
pub const INDEX_MUT: [&str; 3] = ["core", "ops", "IndexMut"];
40-
pub const INIT: [&str; 4] = ["core", "intrinsics", "", "init"];
4140
pub const INTO: [&str; 3] = ["core", "convert", "Into"];
4241
pub const INTO_ITERATOR: [&str; 5] = ["core", "iter", "traits", "collect", "IntoIterator"];
4342
pub const IO_READ: [&str; 3] = ["std", "io", "Read"];
@@ -50,8 +49,6 @@ pub const LINT_PASS: [&str; 3] = ["rustc", "lint", "LintPass"];
5049
pub const MEM_DISCRIMINANT: [&str; 3] = ["core", "mem", "discriminant"];
5150
pub const MEM_FORGET: [&str; 3] = ["core", "mem", "forget"];
5251
pub const MEM_REPLACE: [&str; 3] = ["core", "mem", "replace"];
53-
pub const MEM_UNINIT: [&str; 3] = ["core", "mem", "uninitialized"];
54-
pub const MEM_ZEROED: [&str; 3] = ["core", "mem", "zeroed"];
5552
pub const MUTEX: [&str; 4] = ["std", "sync", "mutex", "Mutex"];
5653
pub const OPEN_OPTIONS: [&str; 3] = ["std", "fs", "OpenOptions"];
5754
pub const OPS_MODULE: [&str; 2] = ["core", "ops"];
@@ -109,7 +106,6 @@ pub const TO_STRING_METHOD: [&str; 4] = ["alloc", "string", "ToString", "to_stri
109106
pub const TRANSMUTE: [&str; 4] = ["core", "intrinsics", "", "transmute"];
110107
pub const TRY_FROM_ERROR: [&str; 4] = ["std", "ops", "Try", "from_error"];
111108
pub const TRY_INTO_RESULT: [&str; 4] = ["std", "ops", "Try", "into_result"];
112-
pub const UNINIT: [&str; 4] = ["core", "intrinsics", "", "uninit"];
113109
pub const VEC: [&str; 3] = ["alloc", "vec", "Vec"];
114110
pub const VEC_DEQUE: [&str; 4] = ["alloc", "collections", "vec_deque", "VecDeque"];
115111
pub const VEC_FROM_ELEM: [&str; 3] = ["alloc", "vec", "from_elem"];

tests/ui/invalid_ref.rs

-56
This file was deleted.

tests/ui/invalid_ref.stderr

-43
This file was deleted.

0 commit comments

Comments
 (0)