about summary refs log tree commit diff
path: root/src/test/ui/allocator
diff options
context:
space:
mode:
authorTim Diekmann <tim.diekmann@3dvision.de>2020-03-28 20:21:26 +0100
committerTim Diekmann <tim.diekmann@3dvision.de>2020-03-28 20:22:07 +0100
commitbf6a46db3129b0bf31dc67f06af2e52ece52701a (patch)
tree202ce2e37985e512df1e0b005a79010aa0a66a58 /src/test/ui/allocator
parentdb15fe6b383741ae1cc13cfb62fc1c18f8ff5241 (diff)
downloadrust-bf6a46db3129b0bf31dc67f06af2e52ece52701a.tar.gz
rust-bf6a46db3129b0bf31dc67f06af2e52ece52701a.zip
Make fields in `MemoryBlock` public
Diffstat (limited to 'src/test/ui/allocator')
-rw-r--r--src/test/ui/allocator/custom.rs8
-rw-r--r--src/test/ui/allocator/xcrate-use.rs8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/test/ui/allocator/custom.rs b/src/test/ui/allocator/custom.rs
index 8f894c5db5d..184e4706a4c 100644
--- a/src/test/ui/allocator/custom.rs
+++ b/src/test/ui/allocator/custom.rs
@@ -38,9 +38,9 @@ fn main() {
         let layout = Layout::from_size_align(4, 2).unwrap();
 
         let memory = Global.alloc(layout.clone(), AllocInit::Uninitialized).unwrap();
-        helper::work_with(&memory.ptr());
+        helper::work_with(&memory.ptr);
         assert_eq!(HITS.load(Ordering::SeqCst), n + 1);
-        Global.dealloc(memory.ptr(), layout);
+        Global.dealloc(memory.ptr, layout);
         assert_eq!(HITS.load(Ordering::SeqCst), n + 2);
 
         let s = String::with_capacity(10);
@@ -51,8 +51,8 @@ fn main() {
 
         let memory = System.alloc(layout.clone(), AllocInit::Uninitialized).unwrap();
         assert_eq!(HITS.load(Ordering::SeqCst), n + 4);
-        helper::work_with(&memory.ptr());
-        System.dealloc(memory.ptr(), layout);
+        helper::work_with(&memory.ptr);
+        System.dealloc(memory.ptr, layout);
         assert_eq!(HITS.load(Ordering::SeqCst), n + 4);
     }
 }
diff --git a/src/test/ui/allocator/xcrate-use.rs b/src/test/ui/allocator/xcrate-use.rs
index 689804bde86..7de1ab7a553 100644
--- a/src/test/ui/allocator/xcrate-use.rs
+++ b/src/test/ui/allocator/xcrate-use.rs
@@ -21,15 +21,15 @@ fn main() {
         let layout = Layout::from_size_align(4, 2).unwrap();
 
         let memory = Global.alloc(layout.clone(), AllocInit::Uninitialized).unwrap();
-        helper::work_with(&memory.ptr());
+        helper::work_with(&memory.ptr);
         assert_eq!(GLOBAL.0.load(Ordering::SeqCst), n + 1);
-        Global.dealloc(memory.ptr(), layout);
+        Global.dealloc(memory.ptr, layout);
         assert_eq!(GLOBAL.0.load(Ordering::SeqCst), n + 2);
 
         let memory = System.alloc(layout.clone(), AllocInit::Uninitialized).unwrap();
         assert_eq!(GLOBAL.0.load(Ordering::SeqCst), n + 2);
-        helper::work_with(&memory.ptr());
-        System.dealloc(memory.ptr(), layout);
+        helper::work_with(&memory.ptr);
+        System.dealloc(memory.ptr, layout);
         assert_eq!(GLOBAL.0.load(Ordering::SeqCst), n + 2);
     }
 }