error[E0080]: evaluation of `<std::vec::Vec<[u16; 2]> as recycle_vec::VecExt<[u16; 2]>>::recycle::<u32>::{constant#0}` failed
--> src/lib.rs
|
| / assert!(
| | core::mem::align_of::<T>() == core::mem::align_of::<U>(),
| | "types must have identical alignment"
| | );
| |_____________^ the evaluated program panicked at 'types must have identical alignment', $DIR/src/lib.rs:97:13
|
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
note: erroneous constant encountered
--> src/lib.rs
|
| / const {
| | assert!(
| | core::mem::size_of::<T>() == core::mem::size_of::<U>(),
| | "types must have identical size"
... |
| | );
| | }
| |_________^
note: the above error was encountered while instantiating `fn <std::vec::Vec<[u16; 2]> as recycle_vec::VecExt<[u16; 2]>>::recycle::<u32>`
--> tests/recycle_incompatible_alignment.rs:7:24
|
7 | let mut buf2 = buf.recycle();
| ^^^^^^^^^^^^^
error[E0080]: evaluation of `<std::vec::Vec<u32> as recycle_vec::VecExt<u32>>::recycle::<[u16; 2]>::{constant#0}` failed
--> src/lib.rs
|
| / assert!(
| | core::mem::align_of::<T>() == core::mem::align_of::<U>(),
| | "types must have identical alignment"
| | );
| |_____________^ the evaluated program panicked at 'types must have identical alignment', $DIR/src/lib.rs:97:13
|
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
note: the above error was encountered while instantiating `fn <std::vec::Vec<u32> as recycle_vec::VecExt<u32>>::recycle::<[u16; 2]>`
--> tests/recycle_incompatible_alignment.rs:9:15
|
9 | buf = buf2.recycle();
| ^^^^^^^^^^^^^^