#![allow(dead_code)]
trait Foo {}
struct A<T>(T);
unsafe impl<T: Foo> Sync for A<T> {} // Comment this line and the code compiles
trait IsSync: Sync {}
struct X;
impl IsSync for A<X> {} // error: the trait `Foo` is not implemented for the type `X` [E0277]
fn main() {}
Nothing in this example opts out of Sync or contains a type that opts out, so everything should be Sync.
I suspect this is the same underlying issue as #23072, but unlike in that case this seems like something that should be allowed.
Nothing in this example opts out of
Syncor contains a type that opts out, so everything should beSync.I suspect this is the same underlying issue as #23072, but unlike in that case this seems like something that should be allowed.