There are a few traits that are automatically implemented where appropriate, without even a #[derive()] tag. These tend to represent extremely low-level aspects of the data types in question.
Traits that are implemented automatically
Sync
The Sync trait is automatically applied to any data type that can safely be borrowed between threads.
While our data types will have the Sync trait automatically if they qualify for it, occasionally we want to be sure that a data type does not have Sync, even if it looks to the compiler like it should.
We can achieve that by implementing !Sync for our data type:
pub enum NotSyncExample {
Good,
Bad,
}
impl !Sync for NotSyncExample {}
We don't actually need any functions inside of !Sync...