You've already forked comprehensive-rust
							
							
				mirror of
				https://github.com/google/comprehensive-rust.git
				synced 2025-10-31 08:37:45 +02:00 
			
		
		
		
	Add trait bound to example for MutexGuard that is !Send + Sync (#1358)
This example only makes sense (and is therefore easier to understand logically :) ) if T is Sync. See https://github.com/rust-lang/rust/issues/41622 - this used to be a bug initially.
This commit is contained in:
		| @@ -28,7 +28,7 @@ Typically because of interior mutability: | ||||
|  | ||||
| These types are thread-safe, but they cannot be moved to another thread: | ||||
|  | ||||
| * `MutexGuard<T>`: Uses OS level primitives which must be deallocated on the | ||||
| * `MutexGuard<T: Sync>`: Uses OS level primitives which must be deallocated on the | ||||
|   thread which created them. | ||||
|  | ||||
| ## `!Send + !Sync` | ||||
|   | ||||
		Reference in New Issue
	
	Block a user