error[E0080]: evaluation panicked:
cannot pun: a pointer of the target is not, in the source, a pointer whose target it can read (the same scheme and offset, the same kind of target, not larger nor more aligned): only a pointer proves a pointer, and no check makes up for it.
This is at byte 0 of the target.
--> src/lib.rs
|
| const VIEW: () = Self::require(Self::check(Need::VIEW));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `puns::Plan::<relative::One<[u8; 4]>, relative::One<u32>>::VIEW` failed inside this call
|
note: inside `puns::Plan::<relative::One<[u8; 4]>, relative::One<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
|
| const { Plan::<S, D>::VIEW };
| ^^^^^^^^^^^^^^^^^^
note: erroneous constant encountered
--> src/lib.rs
|
| const { Plan::<S, D>::VIEW };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: the above error was encountered while instantiating `fn view_ref::<relative::One<[u8; 4]>, relative::One<u32>>`
--> tests/compile-fail/view_more_aligned_target.rs:8:3
|
8 | puns::view_ref(source)
| ^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: evaluation panicked:
cannot pun: a pointer of the target is not, in the source, a pointer of the same scheme and offset that aims at the same kind of thing (a value, a sequence, text): only a pointer proves a pointer.
--> src/deep.rs
|
| const { require(local::<S, D>(0)) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `puns::deep::proof::<relative::One<[u8; 4]>, relative::One<u32>>::{constant#0}` failed inside this call
|
note: inside `puns::deep::require`
--> src/deep.rs
|
| Message::new(why).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/deep.rs
|
| const { require(local::<S, D>(0)) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: the above error was encountered while instantiating `fn puns::deep::proof::<relative::One<[u8; 4]>, relative::One<u32>>`
--> src/lib.rs
|
| deep::proof::<S, D>();
| ^^^^^^^^^^^^^^^^^^^^^