diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:41 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:41 +0000 |
commit | 4f9fe856a25ab29345b90e7725509e9ee38a37be (patch) | |
tree | e4ffd8a9374cae7b21f7cbfb352927e0e074aff6 /tests/ui/mutexguard-sync.rs | |
parent | Adding upstream version 1.68.2+dfsg1. (diff) | |
download | rustc-4f9fe856a25ab29345b90e7725509e9ee38a37be.tar.xz rustc-4f9fe856a25ab29345b90e7725509e9ee38a37be.zip |
Adding upstream version 1.69.0+dfsg1.upstream/1.69.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/mutexguard-sync.rs')
-rw-r--r-- | tests/ui/mutexguard-sync.rs | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/tests/ui/mutexguard-sync.rs b/tests/ui/mutexguard-sync.rs deleted file mode 100644 index b56418383..000000000 --- a/tests/ui/mutexguard-sync.rs +++ /dev/null @@ -1,13 +0,0 @@ -// MutexGuard<Cell<i32>> must not be Sync, that would be unsound. -use std::sync::Mutex; -use std::cell::Cell; - -fn test_sync<T: Sync>(_t: T) {} - -fn main() -{ - let m = Mutex::new(Cell::new(0i32)); - let guard = m.lock().unwrap(); - test_sync(guard); - //~^ ERROR `Cell<i32>` cannot be shared between threads safely [E0277] -} |