]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/issue-42344.rs
Merge commit '27afd6ade4bb1123a8bf82001629b69d23d62aff' into clippyup
[rust.git] / src / test / 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() {}