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