cc #137576. Rustdoc currently shows inherent impl items even if all impl items are private. This affects BTreeMap:
|
/// Internal functionality for `BTreeSet`. |
|
impl<K, A: Allocator + Clone> BTreeMap<K, SetValZST, A> { |
|
pub(super) fn replace(&mut self, key: K) -> Option<K> |
|
where |
|
K: Ord, |
|
{ |
|
let (map, dormant_map) = DormantMutRef::new(self); |
|
let root_node = |
|
map.root.get_or_insert_with(|| Root::new((*map.alloc).clone())).borrow_mut(); |
|
match root_node.search_tree::<K>(&key) { |
|
Found(mut kv) => Some(mem::replace(kv.key_mut(), key)), |
|
GoDown(handle) => { |
|
VacantEntry { |
|
key, |
|
handle: Some(handle), |
|
dormant_map, |
|
alloc: (*map.alloc).clone(), |
|
_marker: PhantomData, |
|
} |
|
.insert(SetValZST); |
|
None |
|
} |
|
} |
|
} |

I feel like the proper fix for this issue is for rustdoc to not show internal inherent impls even if the impl has a doc comment.
cc #137576. Rustdoc currently shows inherent impl items even if all impl items are private. This affects
BTreeMap:rust/library/alloc/src/collections/btree/map.rs
Lines 292 to 315 in ad27045
I feel like the proper fix for this issue is for rustdoc to not show internal inherent impls even if the impl has a doc comment.