Skip to content

Commit a248b2c

Browse files
committed
Deprecated if_let_mutex due to stabilization in 2024 edition
1 parent b829d53 commit a248b2c

File tree

7 files changed

+3
-233
lines changed

7 files changed

+3
-233
lines changed

clippy_lints/src/declared_lints.rs

-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ pub static LINTS: &[&crate::LintInfo] = &[
212212
crate::functions::TOO_MANY_ARGUMENTS_INFO,
213213
crate::functions::TOO_MANY_LINES_INFO,
214214
crate::future_not_send::FUTURE_NOT_SEND_INFO,
215-
crate::if_let_mutex::IF_LET_MUTEX_INFO,
216215
crate::if_not_else::IF_NOT_ELSE_INFO,
217216
crate::if_then_some_else_none::IF_THEN_SOME_ELSE_NONE_INFO,
218217
crate::ignored_unit_patterns::IGNORED_UNIT_PATTERNS_INFO,

clippy_lints/src/deprecated_lints.rs

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ declare_with_version! { DEPRECATED(DEPRECATED_VERSION): &[(&str, &str)] = &[
4040
("clippy::pub_enum_variant_names", "`clippy::enum_variant_names` now covers this case via the `avoid-breaking-exported-api` config"),
4141
#[clippy::version = "1.54.0"]
4242
("clippy::wrong_pub_self_convention", "`clippy::wrong_self_convention` now covers this case via the `avoid-breaking-exported-api` config"),
43+
#[clippy::version = "1.83.0"]
44+
("clippy::if_let_mutex", "`if_let_rescope` is now stable [#131154](https://github.com/rust-lang/rust/issues/131154). The Mutex lock does not held for the whole `if let ... else` block. There are no deadlocks on this reason."),
4345
// end deprecated lints. used by `cargo dev deprecate_lint`
4446
]}
4547

clippy_lints/src/if_let_mutex.rs

-95
This file was deleted.

clippy_lints/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ mod from_raw_with_void_ptr;
152152
mod from_str_radix_10;
153153
mod functions;
154154
mod future_not_send;
155-
mod if_let_mutex;
156155
mod if_not_else;
157156
mod if_then_some_else_none;
158157
mod ignored_unit_patterns;
@@ -791,7 +790,6 @@ pub fn register_lints(store: &mut rustc_lint::LintStore, conf: &'static Conf) {
791790
store.register_late_pass(|_| Box::new(option_if_let_else::OptionIfLetElse));
792791
store.register_late_pass(|_| Box::new(future_not_send::FutureNotSend));
793792
store.register_late_pass(move |_| Box::new(large_futures::LargeFuture::new(conf)));
794-
store.register_late_pass(|_| Box::new(if_let_mutex::IfLetMutex));
795793
store.register_late_pass(|_| Box::new(if_not_else::IfNotElse));
796794
store.register_late_pass(|_| Box::new(equatable_if_let::PatternEquality));
797795
store.register_late_pass(|_| Box::new(manual_async_fn::ManualAsyncFn));

tests/ui/deprecated.rs

+1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
#![warn(clippy::regex_macro)] //~ ERROR: lint `clippy::regex_macro`
1616
#![warn(clippy::pub_enum_variant_names)] //~ ERROR: lint `clippy::pub_enum_variant_names`
1717
#![warn(clippy::wrong_pub_self_convention)] //~ ERROR: lint `clippy::wrong_pub_self_convention`
18+
#![warn(clippy::if_let_mutex)] //~ ERROR: lint `clippy::if_let_mutex`
1819

1920
fn main() {}

tests/ui/if_let_mutex.rs

-62
This file was deleted.

tests/ui/if_let_mutex.stderr

-73
This file was deleted.

0 commit comments

Comments
 (0)