32 lines
1.3 KiB
Plaintext
32 lines
1.3 KiB
Plaintext
error[E0277]: the trait bound `Dst: zerocopy::Immutable` is not satisfied
|
|
--> tests/ui-nightly/transmute-ref-dst-not-nocell.rs:23:33
|
|
|
|
|
23 | const DST_NOT_IMMUTABLE: &Dst = transmute_ref!(&AU16(0));
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
| |
|
|
| unsatisfied trait bound
|
|
| required by a bound introduced by this call
|
|
|
|
|
help: the trait `zerocopy::Immutable` is not implemented for `Dst`
|
|
--> tests/ui-nightly/transmute-ref-dst-not-nocell.rs:20:1
|
|
|
|
|
20 | struct Dst(AU16);
|
|
| ^^^^^^^^^^
|
|
= note: Consider adding `#[derive(Immutable)]` to `Dst`
|
|
= help: the following other types implement trait `zerocopy::Immutable`:
|
|
&T
|
|
&mut T
|
|
()
|
|
*const T
|
|
*mut T
|
|
AU16
|
|
Box<T>
|
|
F32<O>
|
|
and $N others
|
|
note: required by a bound in `AssertDstIsImmutable`
|
|
--> tests/ui-nightly/transmute-ref-dst-not-nocell.rs:23:33
|
|
|
|
|
23 | const DST_NOT_IMMUTABLE: &Dst = transmute_ref!(&AU16(0));
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertDstIsImmutable`
|
|
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
|