What’s where [(); SIZE + Kind::EXTRA]:?
Rust Internals [Unofficial]
February 26, 2026
Ok, makes sence. Thank you so much for your effort!
Alas both pairs generate differing asm, so guess it’s not zero cost. I’d hoped that after inlining the compiler would see through it, but apparently not.
black_box(ArrConcat([65u8; 9], [65]).as_slice()[9]);
black_box([65u8; 10][9]);
black_box(black_box(ArrConcat([65u8; 9], [65]).as_slice()) == black_box(ArrConcat([65u8; 9], [65]).as_slice()));
black_box(black_box([65u8; 10]) == black_box([65u8; 10]));
Discussion in the ATmosphere