]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/issue-42344.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / borrowck / issue-42344.rs
1 static TAB: [&mut [u8]; 0] = [];
2
3 pub unsafe fn test() {
4     TAB[0].iter_mut();
5     //~^ ERROR cannot borrow `*TAB[_]` as mutable, as `TAB` is an immutable static item [E0596]
6 }
7
8 pub fn main() {}