Debian Codegraph @

debian/missing-sources/zerocopy/tests/ui-stable/try_transmute_ref-src-not-immutable-intobytes.stderr

raw
1 error[E0277]: the trait bound `NotZerocopy<AU16>: IntoBytes` is not satisfied
2 --> tests/ui-stable/try_transmute_ref-src-not-immutable-intobytes.rs:17:48
3 |
4 17 | let src_not_into_bytes: Result<&AU16, _> = try_transmute_ref!(&NotZerocopy(AU16(0)));
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
6 |
7 help: the trait `IntoBytes` is not implemented for `NotZerocopy<AU16>`
8 --> tests/ui-stable/../include.rs
9 |
10 15 | pub struct NotZerocopy<T = ()>(pub T);
11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 = note: Consider adding `#[derive(IntoBytes)]` to `NotZerocopy<AU16>`
13 = help: the following other types implement trait `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>: Immutable` is not satisfied
34 --> tests/ui-stable/try_transmute_ref-src-not-immutable-intobytes.rs:17:48
35 |
36 17 | let src_not_into_bytes: Result<&AU16, _> = try_transmute_ref!(&NotZerocopy(AU16(0)));
37 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
38 |
39 help: the trait `Immutable` is not implemented for `NotZerocopy<AU16>`
40 --> tests/ui-stable/../include.rs
41 |
42 15 | pub struct NotZerocopy<T = ()>(pub T);
43 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44 = note: Consider adding `#[derive(Immutable)]` to `NotZerocopy<AU16>`
45 = help: the following other types implement trait `Immutable`:
46 &T
47 &mut T
48 ()
49 (A, B)
50 (A, B, C)
51 (A, B, C, D)
52 (A, B, C, D, E)
53 (A, B, C, D, E, F)
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)