| 1 |
error[E0277]: the trait bound `Src: zerocopy::IntoBytes` is not satisfied |
| 2 |
--> tests/ui-stable/transmute-ref-src-not-intobytes.rs:23:33 |
| 3 |
| |
| 4 |
23 | const SRC_NOT_AS_BYTES: &AU16 = transmute_ref!(&Src(AU16(0))); |
| 5 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 6 |
| | |
| 7 |
| the trait `zerocopy::IntoBytes` is not implemented for `Src` |
| 8 |
| required by a bound introduced by this call |
| 9 |
| |
| 10 |
= note: Consider adding `#[derive(IntoBytes)]` to `Src` |
| 11 |
= help: the following other types implement trait `zerocopy::IntoBytes`: |
| 12 |
() |
| 13 |
AU16 |
| 14 |
AtomicBool |
| 15 |
AtomicI16 |
| 16 |
AtomicI32 |
| 17 |
AtomicI64 |
| 18 |
AtomicI8 |
| 19 |
AtomicIsize |
| 20 |
and $N others |
| 21 |
note: required by a bound in `AssertSrcIsIntoBytes` |
| 22 |
--> tests/ui-stable/transmute-ref-src-not-intobytes.rs:23:33 |
| 23 |
| |
| 24 |
23 | const SRC_NOT_AS_BYTES: &AU16 = transmute_ref!(&Src(AU16(0))); |
| 25 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertSrcIsIntoBytes` |
| 26 |
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 27 |
|
| 28 |
error[E0277]: the trait bound `Src: zerocopy::IntoBytes` is not satisfied |
| 29 |
--> tests/ui-stable/transmute-ref-src-not-intobytes.rs:23:33 |
| 30 |
| |
| 31 |
23 | const SRC_NOT_AS_BYTES: &AU16 = transmute_ref!(&Src(AU16(0))); |
| 32 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `zerocopy::IntoBytes` is not implemented for `Src` |
| 33 |
| |
| 34 |
= note: Consider adding `#[derive(IntoBytes)]` to `Src` |
| 35 |
= help: the following other types implement trait `zerocopy::IntoBytes`: |
| 36 |
() |
| 37 |
AU16 |
| 38 |
AtomicBool |
| 39 |
AtomicI16 |
| 40 |
AtomicI32 |
| 41 |
AtomicI64 |
| 42 |
AtomicI8 |
| 43 |
AtomicIsize |
| 44 |
and $N others |
| 45 |
note: required by a bound in `AssertSrcIsIntoBytes` |
| 46 |
--> tests/ui-stable/transmute-ref-src-not-intobytes.rs:23:33 |
| 47 |
| |
| 48 |
23 | const SRC_NOT_AS_BYTES: &AU16 = transmute_ref!(&Src(AU16(0))); |
| 49 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertSrcIsIntoBytes` |
| 50 |
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info) |