-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Open
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Description
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
| /// 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.
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
