]> git.lizzy.rs Git - rust.git/commitdiff
Remove the note on the internal capacity field in `RawVec`
authorTim Diekmann <tim.diekmann@3dvision.de>
Wed, 25 Mar 2020 17:42:31 +0000 (18:42 +0100)
committerTim Diekmann <tim.diekmann@3dvision.de>
Thu, 26 Mar 2020 16:12:57 +0000 (17:12 +0100)
src/liballoc/raw_vec.rs

index 3bf481a291c53eb45d1c898b2df1e4b9dc14178a..ba810bf5faf98011fc41d4f384077ffbed8a6861 100644 (file)
@@ -41,9 +41,7 @@
 ///
 /// Note that the excess of a zero-sized types is always infinite, so `capacity()` always returns
 /// `usize::MAX`. This means that you need to be careful when round-tripping this type with a
-/// `Box<[T]>`, since `capacity()` won't yield the length. However, `with_capacity`,
-/// `shrink_to_fit`, and `from_box` will actually set `RawVec`'s private capacity field. This allows
-/// zero-sized types to not be special-cased by consumers of this type.
+/// `Box<[T]>`, since `capacity()` won't yield the length.
 #[allow(missing_debug_implementations)]
 pub struct RawVec<T, A: AllocRef = Global> {
     ptr: Unique<T>,