blob: d31c28d843c5dd36a3fd6c836e9463d3c6b1f5d8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#[macro_use]
extern crate bitflags;
mod example {
bitflags! {
pub struct Flags1: u32 {
const FLAG_A = 0b00000001;
}
}
bitflags! {
struct Flags2: u32 {
const FLAG_B = 0b00000010;
}
}
}
fn main() {
let flag1 = example::Flags1::FLAG_A;
let flag2 = example::Flags2::FLAG_B; //~ ERROR struct `Flags2` is private
}
|