Closed
Description
When compiling the following code, with rustc (nightly, beta or stable at the moment):
static TAB: [&mut [u8]; 0] = [];
pub unsafe fn test() {
TAB[0].iter_mut();
}
pub fn main() {}
I get the following error:
error: internal compiler error: /checkout/src/librustc_borrowck/borrowck/mod.rs:808: aliasability violation for static `cannot borrow data mutably`
Here is the relevant playground link: https://is.gd/42slwV
Hope that helps,
Leo