• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1error[E0277]: the trait bound `NotZerocopy: zerocopy::TryFromBytes` is not satisfied
2  --> tests/ui-stable/try_transmute-dst-not-tryfrombytes.rs:17:33
3   |
417 |     let dst_not_try_from_bytes: Result<NotZerocopy, _> = try_transmute!(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-stable/try_transmute-dst-not-tryfrombytes.rs:17:58
26   |
2717 |     let dst_not_try_from_bytes: Result<NotZerocopy, _> = try_transmute!(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`
42  --> src/util/macro_util.rs
43   |
44   | pub fn try_transmute<Src, Dst>(src: Src) -> Result<Dst, ValidityError<Src, Dst>>
45   |        ------------- required by a bound in this function
46...
47   |     Dst: TryFromBytes,
48   |          ^^^^^^^^^^^^ required by this bound in `try_transmute`
49   = note: this error originates in the macro `try_transmute` (in Nightly builds, run with -Z macro-backtrace for more info)
50
51error[E0277]: the trait bound `NotZerocopy: zerocopy::TryFromBytes` is not satisfied
52  --> tests/ui-stable/try_transmute-dst-not-tryfrombytes.rs:17:58
53   |
5417 |     let dst_not_try_from_bytes: Result<NotZerocopy, _> = try_transmute!(AU16(0));
55   |                                                          ^^^^^^^^^^^^^^^^^^^^^^^ the trait `zerocopy::TryFromBytes` is not implemented for `NotZerocopy`
56   |
57   = note: Consider adding `#[derive(TryFromBytes)]` to `NotZerocopy`
58   = help: the following other types implement trait `zerocopy::TryFromBytes`:
59             ()
60             *const T
61             *mut T
62             AU16
63             AtomicBool
64             AtomicI16
65             AtomicI32
66             AtomicI64
67           and $N others
68note: required by a bound in `ValidityError`
69  --> src/error.rs
70   |
71   | pub struct ValidityError<Src, Dst: ?Sized + TryFromBytes> {
72   |                                             ^^^^^^^^^^^^ required by this bound in `ValidityError`
73   = note: this error originates in the macro `try_transmute` (in Nightly builds, run with -Z macro-backtrace for more info)
74