]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/issues/issue-42344.rs
Rollup merge of #62337 - Mark-Simulacrum:fix-cpu-usage-script, r=alexcrichton
[rust.git] / src / test / ui / issues / issue-42344.rs
index 2f11ff402beed7ad225c6b29cc15a938c10d319c..a7636edf2f8db063c20d24a44ab4d7d1e818b8ae 100644 (file)
@@ -1,17 +1,8 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
 static TAB: [&mut [u8]; 0] = [];
 
 pub unsafe fn test() {
-    TAB[0].iter_mut(); //~ ERROR cannot borrow data mutably in a `&` reference [E0389]
+    TAB[0].iter_mut();
+    //~^ ERROR cannot borrow `*TAB[_]` as mutable, as `TAB` is an immutable static item [E0596]
 }
 
 pub fn main() {}