Skip to content

Commit f067c5c

Browse files
committed
Auto merge of #3566 - kinnison:kinnison/typofix, r=phansch
mutex_atomic: Correct location of AtomicBool and friends The AtomicBool, AtomicUsize, and friends, types live in the `std::sync::atomic` module, rather than `std::atomic` as the lint help text used to say.
2 parents 691e5e7 + 5875ba3 commit f067c5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: clippy_lints/src/mutex_atomic.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use crate::utils::{match_type, paths, span_lint};
2222
///
2323
/// **Why is this bad?** Using a mutex just to make access to a plain bool or
2424
/// reference sequential is shooting flies with cannons.
25-
/// `std::atomic::AtomicBool` and `std::atomic::AtomicPtr` are leaner and
25+
/// `std::sync::atomic::AtomicBool` and `std::sync::atomic::AtomicPtr` are leaner and
2626
/// faster.
2727
///
2828
/// **Known problems:** This lint cannot detect if the mutex is actually used
@@ -43,7 +43,7 @@ declare_clippy_lint! {
4343
///
4444
/// **Why is this bad?** Using a mutex just to make access to a plain integer
4545
/// sequential is
46-
/// shooting flies with cannons. `std::atomic::usize` is leaner and faster.
46+
/// shooting flies with cannons. `std::sync::atomic::AtomicUsize` is leaner and faster.
4747
///
4848
/// **Known problems:** This lint cannot detect if the mutex is actually used
4949
/// for waiting before a critical section.

0 commit comments

Comments
 (0)