Skip to content

Commit 843708a

Browse files
committed
Add missing #[allow(missing_docs)] on hack functions in alloc
1 parent 7dd1be1 commit 843708a

3 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎library/alloc/src/slice.rs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ pub(crate) mod hack {
9696
// We shouldn't add inline attribute to this since this is used in
9797
// `vec!` macro mostly and causes perf regression. See #71204 for
9898
// discussion and perf results.
99+
#[allow(missing_docs)]
99100
pubfninto_vec<T,A:Allocator>(b:Box<[T],A>) -> Vec<T,A>{
100101
unsafe{
101102
let len = b.len();
@@ -105,6 +106,7 @@ pub(crate) mod hack {
105106
}
106107

107108
#[cfg(not(no_global_oom_handling))]
109+
#[allow(missing_docs)]
108110
#[inline]
109111
pubfnto_vec<T:ConvertVec,A:Allocator>(s:&[T],alloc:A) -> Vec<T,A>{
110112
T::to_vec(s, alloc)

‎library/alloc/src/string.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,7 @@ impl String {
508508
// NB see the slice::hack module in slice.rs for more information
509509
#[inline]
510510
#[cfg(test)]
511+
#[allow(missing_docs)]
511512
pubfnfrom_str(_:&str) -> String{
512513
panic!("not available with cfg(test)");
513514
}

‎library/std/src/io/buffered/bufreader.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ impl<R: ?Sized> BufReader<R> {
267267
// This is only used by a test which asserts that the initialization-tracking is correct.
268268
#[cfg(test)]
269269
impl<R: ?Sized>BufReader<R>{
270+
#[allow(missing_docs)]
270271
pubfninitialized(&self) -> usize{
271272
self.buf.initialized()
272273
}

0 commit comments

Comments
 (0)