#[Q] Are mutable references (&mut) always not Sync
3 messages · Page 1 of 1 (latest)
A somewhat surprising consequence of the definition is that
&mut TisSync(ifTisSync) even though it seems like that might provide unsynchronized mutation. The trick is that a mutable reference behind a shared reference (that is,& &mut T) becomes read-only, as if it were a& &T. Hence there is no risk of a data race.
https://doc.rust-lang.org/core/marker/trait.Sync.html
also note there is nothing you can do with a guarantee that something doesn't implement a trait