error[E0277]: `std::cell::UnsafeCell>` cannot be shared between threads safely --> $DIR/typeck-unsafe-always-share.rs:29:5 | LL | test(us); | ^^^^ `std::cell::UnsafeCell>` cannot be shared between threads safely | = help: the trait `std::marker::Sync` is not implemented for `std::cell::UnsafeCell>` note: required by `test` --> $DIR/typeck-unsafe-always-share.rs:25:1 | LL | fn test(s: T) {} | ^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: `std::cell::UnsafeCell` cannot be shared between threads safely --> $DIR/typeck-unsafe-always-share.rs:33:5 | LL | test(uns); | ^^^^ `std::cell::UnsafeCell` cannot be shared between threads safely | = help: the trait `std::marker::Sync` is not implemented for `std::cell::UnsafeCell` note: required by `test` --> $DIR/typeck-unsafe-always-share.rs:25:1 | LL | fn test(s: T) {} | ^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: `std::cell::UnsafeCell` cannot be shared between threads safely --> $DIR/typeck-unsafe-always-share.rs:37:5 | LL | test(ms); | ^^^^ `std::cell::UnsafeCell` cannot be shared between threads safely | = help: within `MySync`, the trait `std::marker::Sync` is not implemented for `std::cell::UnsafeCell` = note: required because it appears within the type `MySync` note: required by `test` --> $DIR/typeck-unsafe-always-share.rs:25:1 | LL | fn test(s: T) {} | ^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: `NoSync` cannot be shared between threads safely --> $DIR/typeck-unsafe-always-share.rs:40:5 | LL | test(NoSync); | ^^^^ `NoSync` cannot be shared between threads safely | = help: the trait `std::marker::Sync` is not implemented for `NoSync` note: required by `test` --> $DIR/typeck-unsafe-always-share.rs:25:1 | LL | fn test(s: T) {} | ^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0277`.