summaryrefslogtreecommitdiffstats
path: root/tests/ui/mutexguard-sync.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:41 +0000
commit4f9fe856a25ab29345b90e7725509e9ee38a37be (patch)
treee4ffd8a9374cae7b21f7cbfb352927e0e074aff6 /tests/ui/mutexguard-sync.rs
parentAdding upstream version 1.68.2+dfsg1. (diff)
downloadrustc-upstream/1.69.0+dfsg1.tar.xz
rustc-upstream/1.69.0+dfsg1.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.rs13
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]
-}