error[E0277]: the trait bound `&'a i32: shared_memory::cast::SharedMemCast` is not satisfied --> $DIR/refs.rs:7:8 | 7 | x: &'a i32, | ^ | | | the trait `shared_memory::cast::SharedMemCast` is not implemented for `&'a i32` | help: consider removing 1 leading `&`-references | = help: the following implementations were found: = note: required by `shared_memory::cast::AssertIsSharedMemCast` error[E0277]: the trait bound `&'a i32: shared_memory::cast::SharedMemCast` is not satisfied --> $DIR/refs.rs:11:26 | 11 | pub struct MyStruct2<'a>(&'a i32); | ^ | | | the trait `shared_memory::cast::SharedMemCast` is not implemented for `&'a i32` | help: consider removing 1 leading `&`-references | = help: the following implementations were found: = note: required by `shared_memory::cast::AssertIsSharedMemCast` error[E0277]: the trait bound `&'a (dyn shared_memory::cast::SharedMemCast + 'a): shared_memory::cast::SharedMemCast` is not satisfied --> $DIR/refs.rs:15:8 | 15 | x: &'a dyn SharedMemCast, | ^ | | | the trait `shared_memory::cast::SharedMemCast` is not implemented for `&'a (dyn shared_memory::cast::SharedMemCast + 'a)` | help: consider removing 1 leading `&`-references | = note: required by `shared_memory::cast::AssertIsSharedMemCast` error[E0277]: the trait bound `&'a (dyn shared_memory::cast::SharedMemCast + 'a): shared_memory::cast::SharedMemCast` is not satisfied --> $DIR/refs.rs:19:37 | 19 | pub struct MyStruct2TraitObject<'a>(&'a dyn SharedMemCast); | ^ | | | the trait `shared_memory::cast::SharedMemCast` is not implemented for `&'a (dyn shared_memory::cast::SharedMemCast + 'a)` | help: consider removing 1 leading `&`-references | = note: required by `shared_memory::cast::AssertIsSharedMemCast` error[E0277]: the trait bound `&'static T: shared_memory::cast::SharedMemCast` is not satisfied --> $DIR/refs.rs:24:8 | 24 | x: &'static T, | ^ | | | the trait `shared_memory::cast::SharedMemCast` is not implemented for `&'static T` | help: consider removing 1 leading `&`-references | = note: required by `shared_memory::cast::AssertIsSharedMemCast` error[E0277]: the trait bound `&'static T: shared_memory::cast::SharedMemCast` is not satisfied --> $DIR/refs.rs:28:56 | 28 | pub struct MyStruct2Static(&'static T); | ^ | | | the trait `shared_memory::cast::SharedMemCast` is not implemented for `&'static T` | help: consider removing 1 leading `&`-references | = note: required by `shared_memory::cast::AssertIsSharedMemCast` For more information about this error, try `rustc --explain E0277`.