diff options
Diffstat (limited to 'src/test/ui/mutexguard-sync.rs')
| -rw-r--r-- | src/test/ui/mutexguard-sync.rs | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/test/ui/mutexguard-sync.rs b/src/test/ui/mutexguard-sync.rs deleted file mode 100644 index b5641838318..00000000000 --- a/src/test/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] -} |
