Skip to content

Conversation

@taiki-e
Copy link
Member

@taiki-e taiki-e commented Jan 3, 2021

unreachable_pub lint warns items that are marked as pub but are not actually included in the public API, and suggests using pub(crate) instead.

pub(crate) is a bit more verbose than pub, but this should make it easier to review changes that make it difficult to tell if it will break API or not just by looking at the diff like #617 (comment). Especially, there are many such codes in crossbeam-channel and crossbeam-epoch. (Hopefully, after this patch, we can basically consider all items marked pub are public APIs, except for items that have been explicitly hidden from the public API by #[doc(hidden)].)

This lint is known to have some false positives, but the crossbeam doesn't seem to be affected.

@taiki-e taiki-e requested review from Vtec234 and jeehoonkang January 3, 2021 14:34
Copy link
Member

@Vtec234 Vtec234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo the already raised issues.

@jeehoonkang
Copy link
Contributor

bors r+

@bors
Copy link
Contributor

bors bot commented Jan 4, 2021

Build succeeded:

@bors bors bot merged commit bbe1b5e into crossbeam-rs:master Jan 4, 2021
@taiki-e taiki-e deleted the unreachable_pub branch January 4, 2021 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants