Debian Codegraph @

.cargo/vendor/zerocopy/tests/ui-nightly/try_transmute_ref-src-not-immutable-intobytes.stderr

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