Skip to content

Commit dc15588

Browse files
authored
RawVecInner: add missing unsafe to unsafe fns
1 parent 321a89b commit dc15588

File tree

1 file changed

+4
-4
lines changed
  • library/alloc/src/raw_vec

1 file changed

+4
-4
lines changed

library/alloc/src/raw_vec/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ impl<A: Allocator> RawVecInner<A> {
573573
}
574574
}
575575

576-
fn try_reserve(
576+
unsafe fn try_reserve(
577577
&mut self,
578578
len: usize,
579579
additional: usize,
@@ -597,7 +597,7 @@ impl<A: Allocator> RawVecInner<A> {
597597
}
598598
}
599599

600-
fn try_reserve_exact(
600+
unsafe fn try_reserve_exact(
601601
&mut self,
602602
len: usize,
603603
additional: usize,
@@ -636,7 +636,7 @@ impl<A: Allocator> RawVecInner<A> {
636636
self.cap = unsafe { Cap::new_unchecked(cap) };
637637
}
638638

639-
fn grow_amortized(
639+
unsafe fn grow_amortized(
640640
&mut self,
641641
len: usize,
642642
additional: usize,
@@ -668,7 +668,7 @@ impl<A: Allocator> RawVecInner<A> {
668668
Ok(())
669669
}
670670

671-
fn grow_exact(
671+
unsafe fn grow_exact(
672672
&mut self,
673673
len: usize,
674674
additional: usize,

0 commit comments

Comments
 (0)