mirror of
https://github.com/Lokathor/bytemuck.git
synced 2024-12-18 03:22:50 +00:00
cd8dbd64e9
* Attach min_const_generics to a crate feature * Remove `min_const_generics` detection logic
13 lines
251 B
Rust
13 lines
251 B
Rust
#[test]
|
|
pub fn test_cast_array() {
|
|
let x = [0u32, 1u32, 2u32];
|
|
let _: [u16; 6] = bytemuck::cast(x);
|
|
}
|
|
|
|
#[cfg(feature = "min_const_generics")]
|
|
#[test]
|
|
pub fn test_cast_long_array() {
|
|
let x = [0u32; 65];
|
|
let _: [u16; 130] = bytemuck::cast(x);
|
|
}
|