Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply unreachable_pub lint #637

Merged
merged 1 commit into from
Jan 4, 2021
Merged

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 jeehoonkang and Vtec234 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