Skip to content

Commit b397865

Browse files
committed
Remove memory rules, macos donesn't have them
1 parent e383ae5 commit b397865

6 files changed

Lines changed: 0 additions & 53 deletions

File tree

‎rules/memory/src_until_cxx23.cpp‎

Lines changed: 0 additions & 9 deletions
This file was deleted.

‎rules/memory/tgt_refcount.rs‎

Lines changed: 0 additions & 12 deletions
This file was deleted.

‎rules/memory/tgt_unsafe.rs‎

Lines changed: 0 additions & 10 deletions
This file was deleted.

‎tests/unit/08_unique_array.cpp‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// ADDITIONAL_COMPILE_FLAGS: -std=c++20
21
#include <cassert>
32
#include <memory>
43

@@ -10,10 +9,5 @@ int main() {
109
g_ptr[0] = 13;
1110
g_ptr[1] = 14;
1211
assert(g[0] + g[1] == 27);
13-
auto buf = std::make_unique<char[]>(16);
14-
std::declare_no_pointers(buf.get(), 16);
15-
buf[0] = 'x';
16-
std::undeclare_no_pointers(buf.get(), 16);
17-
assert(buf[0] == 'x');
1812
return 0;
1913
}

‎tests/unit/out/refcount/08_unique_array.rs‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@ fn main_0() -> i32 {
2424
+ g.as_ref().unwrap().borrow()[(1_usize) as usize])
2525
== 27)
2626
);
27-
let mut buf: Option<Value<Box<[i8]>>> = Some(Rc::new(RefCell::new(
28-
(0..16_usize).map(|_| <i8>::default()).collect::<Box<[_]>>(),
29-
)));
30-
();
31-
buf.as_ref().unwrap().borrow_mut()[(0_usize) as usize] = ('x' as i8);
32-
();
33-
assert!(((buf.as_ref().unwrap().borrow()[(0_usize) as usize] as i32) == (('x' as i8) as i32)));
3427
return 0;
3528
}
3629
pub fn __cpp2rust_init_globals() {}

‎tests/unit/out/unsafe/08_unique_array.rs‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,6 @@ unsafe fn main_0() -> i32 {
2323
(*g_ptr.offset((0) as isize)) = 13;
2424
(*g_ptr.offset((1) as isize)) = 14;
2525
assert!((((g.as_mut().unwrap()[(0_usize)]) + (g.as_mut().unwrap()[(1_usize)])) == (27)));
26-
let mut buf: Option<Box<[libc::c_char]>> = Some(
27-
(0..16_usize)
28-
.map(|_| <libc::c_char>::default())
29-
.collect::<Box<[_]>>(),
30-
);
31-
();
32-
buf.as_mut().unwrap()[(0_usize)] = ('x' as libc::c_char);
33-
();
34-
assert!(((buf.as_mut().unwrap()[(0_usize)] as i32) == (('x' as libc::c_char) as i32)));
3526
return 0;
3627
}
3728
pub unsafe fn __cpp2rust_init_globals() {}

0 commit comments

Comments
 (0)