• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1error[E0277]: the trait bound `NotZerocopy: zerocopy::TryFromBytes` is not satisfied
2  --> tests/ui-nightly/try_transmute_ref-dst-not-immutable-tryfrombytes.rs:19:33
3   |
419 |     let dst_not_try_from_bytes: Result<&NotZerocopy, _> = try_transmute_ref!(&AU16(0));
5   |                                 ^^^^^^^^^^^^^^^^^^^^^^^ the trait `zerocopy::TryFromBytes` is not implemented for `NotZerocopy`
6   |
7   = note: Consider adding `#[derive(TryFromBytes)]` to `NotZerocopy`
8   = help: the following other types implement trait `zerocopy::TryFromBytes`:
9             ()
10             *const T
11             *mut T
12             AU16
13             AtomicBool
14             AtomicI16
15             AtomicI32
16             AtomicI64
17           and $N others
18note: required by a bound in `ValidityError`
19  --> src/error.rs
20   |
21   | pub struct ValidityError<Src, Dst: ?Sized + TryFromBytes> {
22   |                                             ^^^^^^^^^^^^ required by this bound in `ValidityError`
23
24error[E0277]: the trait bound `NotZerocopy: zerocopy::TryFromBytes` is not satisfied
25  --> tests/ui-nightly/try_transmute_ref-dst-not-immutable-tryfrombytes.rs:19:59
26   |
2719 |     let dst_not_try_from_bytes: Result<&NotZerocopy, _> = try_transmute_ref!(&AU16(0));
28   |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `zerocopy::TryFromBytes` is not implemented for `NotZerocopy`
29   |
30   = note: Consider adding `#[derive(TryFromBytes)]` to `NotZerocopy`
31   = help: the following other types implement trait `zerocopy::TryFromBytes`:
32             ()
33             *const T
34             *mut T
35             AU16
36             AtomicBool
37             AtomicI16
38             AtomicI32
39             AtomicI64
40           and $N others
41note: required by a bound in `try_transmute_ref`
42  --> src/util/macro_util.rs
43   |
44   | pub fn try_transmute_ref<Src, Dst>(src: &Src) -> Result<&Dst, ValidityError<&Src, Dst>>
45   |        ----------------- required by a bound in this function
46...
47   |     Dst: TryFromBytes + Immutable,
48   |          ^^^^^^^^^^^^ required by this bound in `try_transmute_ref`
49   = note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
50
51error[E0277]: the trait bound `NotZerocopy: zerocopy::Immutable` is not satisfied
52  --> tests/ui-nightly/try_transmute_ref-dst-not-immutable-tryfrombytes.rs:19:59
53   |
5419 |     let dst_not_try_from_bytes: Result<&NotZerocopy, _> = try_transmute_ref!(&AU16(0));
55   |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `zerocopy::Immutable` is not implemented for `NotZerocopy`
56   |
57   = note: Consider adding `#[derive(Immutable)]` to `NotZerocopy`
58   = help: the following other types implement trait `zerocopy::Immutable`:
59             &T
60             &mut T
61             ()
62             *const T
63             *mut T
64             AU16
65             Box<T>
66             F32<O>
67           and $N others
68note: required by a bound in `try_transmute_ref`
69  --> src/util/macro_util.rs
70   |
71   | pub fn try_transmute_ref<Src, Dst>(src: &Src) -> Result<&Dst, ValidityError<&Src, Dst>>
72   |        ----------------- required by a bound in this function
73...
74   |     Dst: TryFromBytes + Immutable,
75   |                         ^^^^^^^^^ required by this bound in `try_transmute_ref`
76   = note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
77
78error[E0277]: the trait bound `NotZerocopy: zerocopy::TryFromBytes` is not satisfied
79  --> tests/ui-nightly/try_transmute_ref-dst-not-immutable-tryfrombytes.rs:19:59
80   |
8119 |     let dst_not_try_from_bytes: Result<&NotZerocopy, _> = try_transmute_ref!(&AU16(0));
82   |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `zerocopy::TryFromBytes` is not implemented for `NotZerocopy`
83   |
84   = note: Consider adding `#[derive(TryFromBytes)]` to `NotZerocopy`
85   = help: the following other types implement trait `zerocopy::TryFromBytes`:
86             ()
87             *const T
88             *mut T
89             AU16
90             AtomicBool
91             AtomicI16
92             AtomicI32
93             AtomicI64
94           and $N others
95note: required by a bound in `ValidityError`
96  --> src/error.rs
97   |
98   | pub struct ValidityError<Src, Dst: ?Sized + TryFromBytes> {
99   |                                             ^^^^^^^^^^^^ required by this bound in `ValidityError`
100   = note: this error originates in the macro `try_transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
101