error[E0277]: `T` cannot be shared between threads safely --> $DIR/phantom-oibit.rs:21:12 | LL | fn is_zen(_: T) {} | --- required by this bound in `is_zen` ... LL | is_zen(x) | ^ `T` cannot be shared between threads safely | = note: required because of the requirements on the impl of `Zen` for `&T` = note: required because it appears within the type `PhantomData<&T>` = note: required because it appears within the type `Guard<'_, T>` help: consider restricting type parameter `T` | LL | fn not_sync(x: Guard) { | ^^^^^^ error[E0277]: `T` cannot be shared between threads safely --> $DIR/phantom-oibit.rs:26:12 | LL | fn is_zen(_: T) {} | --- required by this bound in `is_zen` ... LL | is_zen(x) | ^ `T` cannot be shared between threads safely | = note: required because of the requirements on the impl of `Zen` for `&T` = note: required because it appears within the type `PhantomData<&T>` = note: required because it appears within the type `Guard<'_, T>` = note: required because it appears within the type `Nested>` help: consider restricting type parameter `T` | LL | fn nested_not_sync(x: Nested>) { | ^^^^^^ error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0277`.