Skip to content

Commit

Permalink
Merge pull request #153 from hcpl/fix-examples
Browse files Browse the repository at this point in the history
Fix the example `Flags` struct
  • Loading branch information
dtolnay committed Apr 26, 2018
2 parents a9a1dd8 + ce6c446 commit 07a4252
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/example_generated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ bitflags! {
/// This is the same `Flags` struct defined in the [crate level example](../index.html#example).
/// Note that this struct is just for documentation purposes only, it must not be used outside
/// this crate.
pub struct Flags: u32 {
const FLAG_A = 0b00000001;
const FLAG_B = 0b00000010;
const FLAG_C = 0b00000100;
const FLAG_ABC = Self::FLAG_A.bits | Self::FLAG_B.bits | Self::FLAG_C.bits;
struct Flags: u32 {
const A = 0b00000001;
const B = 0b00000010;
const C = 0b00000100;
const ABC = Self::A.bits | Self::B.bits | Self::C.bits;
}
}

0 comments on commit 07a4252

Please sign in to comment.