Files
rust/tests/ui/mutex_atomic.stderr

75 lines
3.1 KiB
Plaintext
Raw Normal View History

error: consider using an `AtomicBool` instead of a `Mutex` here; if you just want the locking behavior and not the internal type, consider using `Mutex<()>`
2024-02-17 12:16:29 +00:00
--> tests/ui/mutex_atomic.rs:8:5
2018-10-06 09:18:06 -07:00
|
2018-12-27 16:57:55 +01:00
LL | Mutex::new(true);
2018-10-06 09:18:06 -07:00
| ^^^^^^^^^^^^^^^^
|
= note: `-D clippy::mutex-atomic` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::mutex_atomic)]`
error: consider using an `AtomicUsize` instead of a `Mutex` here; if you just want the locking behavior and not the internal type, consider using `Mutex<()>`
2025-02-12 23:44:38 +01:00
--> tests/ui/mutex_atomic.rs:11:5
|
2018-12-27 16:57:55 +01:00
LL | Mutex::new(5usize);
| ^^^^^^^^^^^^^^^^^^
error: consider using an `AtomicIsize` instead of a `Mutex` here; if you just want the locking behavior and not the internal type, consider using `Mutex<()>`
2025-02-12 23:44:38 +01:00
--> tests/ui/mutex_atomic.rs:14:5
|
2018-12-27 16:57:55 +01:00
LL | Mutex::new(9isize);
| ^^^^^^^^^^^^^^^^^^
error: consider using an `AtomicPtr` instead of a `Mutex` here; if you just want the locking behavior and not the internal type, consider using `Mutex<()>`
2025-02-12 23:44:38 +01:00
--> tests/ui/mutex_atomic.rs:18:5
|
2018-12-27 16:57:55 +01:00
LL | Mutex::new(&x as *const u32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: consider using an `AtomicPtr` instead of a `Mutex` here; if you just want the locking behavior and not the internal type, consider using `Mutex<()>`
2025-02-12 23:44:38 +01:00
--> tests/ui/mutex_atomic.rs:21:5
|
2018-12-27 16:57:55 +01:00
LL | Mutex::new(&mut x as *mut u32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-25 14:28:01 +08:00
error: consider using an `AtomicU32` instead of a `Mutex` here; if you just want the locking behavior and not the internal type, consider using `Mutex<()>`
2025-02-12 23:44:38 +01:00
--> tests/ui/mutex_atomic.rs:24:5
|
2018-12-27 16:57:55 +01:00
LL | Mutex::new(0u32);
| ^^^^^^^^^^^^^^^^
|
= note: `-D clippy::mutex-integer` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::mutex_integer)]`
2023-12-25 14:28:01 +08:00
error: consider using an `AtomicI32` instead of a `Mutex` here; if you just want the locking behavior and not the internal type, consider using `Mutex<()>`
2025-02-12 23:44:38 +01:00
--> tests/ui/mutex_atomic.rs:27:5
|
2018-12-27 16:57:55 +01:00
LL | Mutex::new(0i32);
| ^^^^^^^^^^^^^^^^
2023-12-25 14:28:01 +08:00
error: consider using an `AtomicU8` instead of a `Mutex` here; if you just want the locking behavior and not the internal type, consider using `Mutex<()>`
2025-02-12 23:44:38 +01:00
--> tests/ui/mutex_atomic.rs:31:5
2023-12-25 14:28:01 +08:00
|
LL | Mutex::new(0u8);
| ^^^^^^^^^^^^^^^
error: consider using an `AtomicI16` instead of a `Mutex` here; if you just want the locking behavior and not the internal type, consider using `Mutex<()>`
2025-02-12 23:44:38 +01:00
--> tests/ui/mutex_atomic.rs:34:5
2023-12-25 14:28:01 +08:00
|
LL | Mutex::new(0i16);
| ^^^^^^^^^^^^^^^^
error: consider using an `AtomicI8` instead of a `Mutex` here; if you just want the locking behavior and not the internal type, consider using `Mutex<()>`
2025-02-12 23:44:38 +01:00
--> tests/ui/mutex_atomic.rs:37:25
2023-12-25 14:28:01 +08:00
|
LL | let _x: Mutex<i8> = Mutex::new(0);
| ^^^^^^^^^^^^^
error: consider using an `AtomicI64` instead of a `Mutex` here; if you just want the locking behavior and not the internal type, consider using `Mutex<()>`
2025-02-12 23:44:38 +01:00
--> tests/ui/mutex_atomic.rs:41:5
2023-12-25 14:28:01 +08:00
|
LL | Mutex::new(X);
| ^^^^^^^^^^^^^
error: aborting due to 11 previous errors
2018-01-16 17:06:27 +01:00