error[E0277]: the trait bound `Opt<u32>: Copy` is not satisfied
--> tests/compile-fail/value_of_pointer.rs:10:26
|
10 | let _: u32 = puns::pun(none);
| --------- ^^^^ unsatisfied trait bound
| |
| required by a bound introduced by this call
|
::: tests/compile-fail/../support/relative.rs
|
| macro_rules! pointer {
|
help: the trait `Copy` is not implemented for `Opt<u32>`
--> tests/compile-fail/../support/relative.rs
|
| / pub struct $name<$($param,)? O = i32le> {
| | offset: O,
| | target: PhantomData<($($param,)?)>,
| | }
| |_____^
...
| / pointer! {
| | /// A pointer to one `T`, or none: zero.
| | Opt[T] T, Pointer::one::<T>(SCHEME, size_of::<O>(), O::ENDIAN).or_null()
| | }
| |_- in this macro invocation
note: required by a bound in `pun`
--> src/lib.rs
|
| pub const fn pun<S: Pun + Copy, D: Pun + Copy>(value: S) -> D {
| ^^^^ required by this bound in `pun`
error[E0277]: the trait bound `Opt<u32>: Copy` is not satisfied
--> tests/compile-fail/value_of_pointer.rs:11:26
|
11 | let _ = puns::zeroed::<Opt<u32>>();
| ^^^^^^^^ unsatisfied trait bound
|
::: tests/compile-fail/../support/relative.rs
|
| macro_rules! pointer {
|
help: the trait `Copy` is not implemented for `Opt<u32>`
--> tests/compile-fail/../support/relative.rs
|
| / pub struct $name<$($param,)? O = i32le> {
| | offset: O,
| | target: PhantomData<($($param,)?)>,
| | }
| |_____^
...
| / pointer! {
| | /// A pointer to one `T`, or none: zero.
| | Opt[T] T, Pointer::one::<T>(SCHEME, size_of::<O>(), O::ENDIAN).or_null()
| | }
| |_- in this macro invocation
note: required by a bound in `puns::zeroed`
--> src/lib.rs
|
| pub const fn zeroed<T: Pun + Copy>() -> T {
| ^^^^ required by this bound in `zeroed`