| 1 |
error[E0277]: the trait bound `NotZerocopy<AU16>: zerocopy::IntoBytes` is not satisfied |
| 2 |
--> tests/ui-stable/try_transmute_ref-src-not-immutable-intobytes.rs:19:48 |
| 3 |
| |
| 4 |
19 | let src_not_into_bytes: Result<&AU16, _> = try_transmute_ref!(&NotZerocopy(AU16(0))); |
| 5 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `zerocopy::IntoBytes` is not implemented for `NotZerocopy<AU16>` |
| 6 |
| |
| 7 |
= note: Consider adding `#[derive(IntoBytes)]` to `NotZerocopy<AU16>` |
| 8 |
= help: the following other types implement trait `zerocopy::IntoBytes`: |
| 9 |
() |
| 10 |
AU16 |
| 11 |
AtomicBool |
| 12 |
AtomicI16 |
| 13 |
AtomicI32 |
| 14 |
AtomicI64 |
| 15 |
AtomicI8 |
| 16 |
AtomicIsize |
| 17 |
and $N others |
| 18 |
note: required by a bound in `try_transmute_ref` |
| 19 |
--> src/util/macro_util.rs |
| 20 |
| |
| 21 |
| pub fn try_transmute_ref<Src, Dst>(src: &Src) -> Result<&Dst, ValidityError<&Src, Dst>> |
| 22 |
| ----------------- required by a bound in this function |
| 23 |
| where |
| 24 |
| Src: IntoBytes + Immutable, |
| 25 |
| ^^^^^^^^^ required by this bound in `try_transmute_ref` |
| 26 |
= note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 27 |
|
| 28 |
error[E0277]: the trait bound `NotZerocopy<AU16>: zerocopy::Immutable` is not satisfied |
| 29 |
--> tests/ui-stable/try_transmute_ref-src-not-immutable-intobytes.rs:19:48 |
| 30 |
| |
| 31 |
19 | let src_not_into_bytes: Result<&AU16, _> = try_transmute_ref!(&NotZerocopy(AU16(0))); |
| 32 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `zerocopy::Immutable` is not implemented for `NotZerocopy<AU16>` |
| 33 |
| |
| 34 |
= note: Consider adding `#[derive(Immutable)]` to `NotZerocopy<AU16>` |
| 35 |
= help: the following other types implement trait `zerocopy::Immutable`: |
| 36 |
&T |
| 37 |
&mut T |
| 38 |
() |
| 39 |
*const T |
| 40 |
*mut T |
| 41 |
AU16 |
| 42 |
Box<T> |
| 43 |
F32<O> |
| 44 |
and $N others |
| 45 |
note: required by a bound in `try_transmute_ref` |
| 46 |
--> src/util/macro_util.rs |
| 47 |
| |
| 48 |
| pub fn try_transmute_ref<Src, Dst>(src: &Src) -> Result<&Dst, ValidityError<&Src, Dst>> |
| 49 |
| ----------------- required by a bound in this function |
| 50 |
| where |
| 51 |
| Src: IntoBytes + Immutable, |
| 52 |
| ^^^^^^^^^ required by this bound in `try_transmute_ref` |
| 53 |
= note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |