error[E0080]: evaluation panicked:
cannot pun: the target holds a self-relative pointer, and what a pointer aims at is not a property of its bytes.
Use `view_ref` to read a value that holds pointers as another type (it proves what they aim at).
--> src/lib.rs
|
| const TRY_REF: () = Self::require(Self::check(Need::TRY_REF));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `puns::Plan::<[u8], relative::Opt<u32>>::TRY_REF` failed inside this call
|
note: inside `puns::Plan::<[u8], Opt<u32>>::require`
--> src/lib.rs
|
| message.panic();
| ^^^^^^^^^^^^^^^
note: inside `puns::Message::panic`
--> $RUST/core/src/panic.rs
|
= note: the failure occurred here
|
::: src/lib.rs
|
| panic!("{}", unsafe { core::str::from_utf8_unchecked(this.bytes.split_at(this.len).0) })
| ---------------------------------------------------------------------------------------- in this macro invocation
note: erroneous constant encountered
--> src/lib.rs
|
| let () = Self::TRY_REF;
| ^^^^^^^^^^^^^
note: erroneous constant encountered
--> src/lib.rs
|
| const { Plan::<S, D>::TRY_MUT };
| ^^^^^^^^^^^^^^^^^^^^^
note: erroneous constant encountered
--> src/lib.rs
|
| const { Plan::<S, D>::TRY_MUT };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: the above error was encountered while instantiating `fn try_pun_mut::<[u8], Opt<u32>>`
--> src/lib.rs
|
| try_pun_mut::<[u8], D>(bytes)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^