about summary refs log tree commit diff
path: root/src/liballoc/raw_vec
diff options
context:
space:
mode:
authorTim Diekmann <tim.diekmann@3dvision.de>2020-03-07 12:04:40 +0100
committerTim Diekmann <tim.diekmann@3dvision.de>2020-03-08 11:01:12 +0100
commitf77afc8f9c63d789519c0b1a733462ca654d894a (patch)
treeb785317fc7da68131a30b7b8967478014f8f2d13 /src/liballoc/raw_vec
parentf943349eafaa75a60c05b0c84dcdb771d0eae8c9 (diff)
downloadrust-f77afc8f9c63d789519c0b1a733462ca654d894a.tar.gz
rust-f77afc8f9c63d789519c0b1a733462ca654d894a.zip
Allow ZSTs in `AllocRef`
Diffstat (limited to 'src/liballoc/raw_vec')
-rw-r--r--src/liballoc/raw_vec/tests.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liballoc/raw_vec/tests.rs b/src/liballoc/raw_vec/tests.rs
index 860058debe1..21a8a76d0a7 100644
--- a/src/liballoc/raw_vec/tests.rs
+++ b/src/liballoc/raw_vec/tests.rs
@@ -20,7 +20,7 @@ fn allocator_param() {
         fuel: usize,
     }
     unsafe impl AllocRef for BoundedAlloc {
-        unsafe fn alloc(&mut self, layout: Layout) -> Result<(NonNull<u8>, usize), AllocErr> {
+        fn alloc(&mut self, layout: Layout) -> Result<(NonNull<u8>, usize), AllocErr> {
             let size = layout.size();
             if size > self.fuel {
                 return Err(AllocErr);