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