-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Removing priv as a keyword #8122
Copy link
Copy link
Closed
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.
Milestone
Metadata
Metadata
Assignees
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Now that you can't really put
pubat the top-level of things like impl/extern/trait, you don't need theprivkeyword to control method visibility of various items because they're all private by default.pros:
difficulties:
privI'd vote to remove it.cons:
priv, and if we removed priv there would be no way to make half the enum variants public and half private. In theorypub enummakes everything public and you could otherwise writepubon each variant, but the type name would still then have to be public and if it didn't havepubin front of it it wouldn't really make senseWhat do others think about this?