diff options
| author | Ralf Jung <post@ralfj.de> | 2023-11-05 16:58:47 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-01-28 10:00:23 +0100 |
| commit | 9a819ab8f7f69b5461d0a9a7f8b57f976de1ae2e (patch) | |
| tree | 4c3747ce2fc09460c2a31b9ed3347dd7e5abedb2 /tests/ui/array-slice-vec | |
| parent | 7df6f4a15e29bf2f28d81ebcd5b5894a2014fcd6 (diff) | |
| download | rust-9a819ab8f7f69b5461d0a9a7f8b57f976de1ae2e.tar.gz rust-9a819ab8f7f69b5461d0a9a7f8b57f976de1ae2e.zip | |
static mut: allow reference to arbitrary types, not just slices and arrays
Diffstat (limited to 'tests/ui/array-slice-vec')
| -rw-r--r-- | tests/ui/array-slice-vec/check-static-mut-slices.rs | 15 |
1 files changed, 0 insertions, 15 deletions
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); - } -} |
