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

Remove obsolete private_in_public lint in nightly. #114

Closed
thenorili opened this issue Nov 10, 2023 · 1 comment
Closed

Remove obsolete private_in_public lint in nightly. #114

thenorili opened this issue Nov 10, 2023 · 1 comment
Assignees

Comments

@thenorili
Copy link
Contributor

thenorili commented Nov 10, 2023

RFC 2145 is on nightly now, deprecating the public_in_private lint.

https://rust-lang.github.io/rfcs/2145-type-privacy.html

See PR #113

public_in_private has been superceded by three new lints. The first two are warn-by-default and the third is allow-by-default. See the excerpt below for some details.

Lint private_interfaces is reported when a type with visibility x is used in primary interface of an item with effective visibility y and x < y. This lint is warn-by-default.
Lint private_bounds is reported when a type or trait with visibility
x is used in secondary interface of an item with effective
visibility y and x < y. This lint is warn-by-default.

Lint unnameable_types is reported when effective visibility of a
type is larger than module in which it can be named, either
directly, or through reexports, or through trivial type aliases
(type X = Y;, no generics on both sides). This lint is
allow-by-default.

Compatibility lint private_in_public is never reported and removed.

@thenorili thenorili self-assigned this Nov 18, 2023
@thenorili
Copy link
Contributor Author

PR #113 is merged, this is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant