Move /src/test to /tests
This commit is contained in:
parent
ca855e6e42
commit
cf2dff2b1e
27592 changed files with 0 additions and 0 deletions
15
tests/ui/array-slice-vec/check-static-mut-slices.rs
Normal file
15
tests/ui/array-slice-vec/check-static-mut-slices.rs
Normal file
|
@ -0,0 +1,15 @@
|
|||
// 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);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue