Bitflags should be private by default #25

Closed
opened 2015-11-27 20:36:51 -06:00 by Amanieu · 0 comments
Amanieu commented 2015-11-27 20:36:51 -06:00 (Migrated from github.com)

Bitflags should match the semantics of structs, which are private by default unless explicitly exported using pub.

Since this is a compat-breaking change, it would make sense to do it at the same time as the switch to associated constants and namespaced flags (#24).

Example:

bitflags! {
    pub flags Flags: u32 {
        const FLAG_A   = 0b00000001,
        const FLAG_B   = 0b00000010,
    }
}
Bitflags should match the semantics of structs, which are private by default unless explicitly exported using `pub`. Since this is a compat-breaking change, it would make sense to do it at the same time as the switch to associated constants and namespaced flags (#24). Example: ``` rust bitflags! { pub flags Flags: u32 { const FLAG_A = 0b00000001, const FLAG_B = 0b00000010, } } ```
Sign in to join this conversation.
No labels
bug
good first issue
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-bitflags/bitflags#25
No description provided.