From 9a819ab8f7f69b5461d0a9a7f8b57f976de1ae2e Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 5 Nov 2023 16:58:47 +0100 Subject: static mut: allow reference to arbitrary types, not just slices and arrays --- tests/ui/array-slice-vec/check-static-mut-slices.rs | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 tests/ui/array-slice-vec/check-static-mut-slices.rs (limited to 'tests/ui/array-slice-vec') diff --git a/tests/ui/array-slice-vec/check-static-mut-slices.rs b/tests/ui/array-slice-vec/check-static-mut-slices.rs deleted file mode 100644 index b89c634036e..00000000000 --- a/tests/ui/array-slice-vec/check-static-mut-slices.rs +++ /dev/null @@ -1,15 +0,0 @@ -// run-pass -#![allow(dead_code)] - -// Checks that mutable static items can have mutable slices - - -static mut TEST: &'static mut [isize] = &mut [1]; -static mut EMPTY: &'static mut [isize] = &mut []; - -pub fn main() { - unsafe { - TEST[0] += 1; - assert_eq!(TEST[0], 2); - } -} -- cgit 1.4.1-3-g733a5