core: add #![warn(unreachable_pub)]

This commit is contained in:
Urgau
2024-12-13 19:53:04 +01:00
parent 0f30662147
commit 8e61502484
17 changed files with 111 additions and 103 deletions

View File

@@ -893,7 +893,7 @@ impl<T> Guard<'_, T> {
///
/// No more than N elements must be initialized.
#[inline]
pub unsafe fn push_unchecked(&mut self, item: T) {
pub(crate) unsafe fn push_unchecked(&mut self, item: T) {
// SAFETY: If `initialized` was correct before and the caller does not
// invoke this method more than N times then writes will be in-bounds
// and slots will not be initialized more than once.