1# 1.2.1 2 3- Remove extraneous `#[inline]` attributes ([#194]) 4 5[#194]: https://github.com/bitflags/bitflags/pull/194 6 7# 1.2.0 8 9- Fix typo: {Lower, Upper}Exp - {Lower, Upper}Hex ([#183]) 10 11- Add support for "unknown" bits ([#188]) 12 13[#183]: https://github.com/rust-lang-nursery/bitflags/pull/183 14[#188]: https://github.com/rust-lang-nursery/bitflags/pull/188 15 16# 1.1.0 17 18This is a re-release of `1.0.5`, which was yanked due to a bug in the RLS. 19 20# 1.0.5 21 22- Use compiletest_rs flags supported by stable toolchain ([#171]) 23 24- Put the user provided attributes first ([#173]) 25 26- Make bitflags methods `const` on newer compilers ([#175]) 27 28[#171]: https://github.com/rust-lang-nursery/bitflags/pull/171 29[#173]: https://github.com/rust-lang-nursery/bitflags/pull/173 30[#175]: https://github.com/rust-lang-nursery/bitflags/pull/175 31 32# 1.0.4 33 34- Support Rust 2018 style macro imports ([#165]) 35 36 ```rust 37 use bitflags::bitflags; 38 ``` 39 40[#165]: https://github.com/rust-lang-nursery/bitflags/pull/165 41 42# 1.0.3 43 44- Improve zero value flag handling and documentation ([#157]) 45 46[#157]: https://github.com/rust-lang-nursery/bitflags/pull/157 47 48# 1.0.2 49 50- 30% improvement in compile time of bitflags crate ([#156]) 51 52- Documentation improvements ([#153]) 53 54- Implementation cleanup ([#149]) 55 56[#156]: https://github.com/rust-lang-nursery/bitflags/pull/156 57[#153]: https://github.com/rust-lang-nursery/bitflags/pull/153 58[#149]: https://github.com/rust-lang-nursery/bitflags/pull/149 59 60# 1.0.1 61- Add support for `pub(restricted)` specifier on the bitflags struct ([#135]) 62- Optimize performance of `all()` when called from a separate crate ([#136]) 63 64[#135]: https://github.com/rust-lang-nursery/bitflags/pull/135 65[#136]: https://github.com/rust-lang-nursery/bitflags/pull/136 66 67# 1.0.0 68- **[breaking change]** Macro now generates [associated constants](https://doc.rust-lang.org/reference/items.html#associated-constants) ([#24]) 69 70- **[breaking change]** Minimum supported version is Rust **1.20**, due to usage of associated constants 71 72- After being broken in 0.9, the `#[deprecated]` attribute is now supported again ([#112]) 73 74- Other improvements to unit tests and documentation ([#106] and [#115]) 75 76[#24]: https://github.com/rust-lang-nursery/bitflags/pull/24 77[#106]: https://github.com/rust-lang-nursery/bitflags/pull/106 78[#112]: https://github.com/rust-lang-nursery/bitflags/pull/112 79[#115]: https://github.com/rust-lang-nursery/bitflags/pull/115 80 81## How to update your code to use associated constants 82Assuming the following structure definition: 83```rust 84bitflags! { 85 struct Something: u8 { 86 const FOO = 0b01, 87 const BAR = 0b10 88 } 89} 90``` 91In 0.9 and older you could do: 92```rust 93let x = FOO.bits | BAR.bits; 94``` 95Now you must use: 96```rust 97let x = Something::FOO.bits | Something::BAR.bits; 98``` 99 100# 0.9.1 101- Fix the implementation of `Formatting` traits when other formatting traits were present in scope ([#105]) 102 103[#105]: https://github.com/rust-lang-nursery/bitflags/pull/105 104 105# 0.9.0 106- **[breaking change]** Use struct keyword instead of flags to define bitflag types ([#84]) 107 108- **[breaking change]** Terminate const items with semicolons instead of commas ([#87]) 109 110- Implement the `Hex`, `Octal`, and `Binary` formatting traits ([#86]) 111 112- Printing an empty flag value with the `Debug` trait now prints "(empty)" instead of nothing ([#85]) 113 114- The `bitflags!` macro can now be used inside of a fn body, to define a type local to that function ([#74]) 115 116[#74]: https://github.com/rust-lang-nursery/bitflags/pull/74 117[#84]: https://github.com/rust-lang-nursery/bitflags/pull/84 118[#85]: https://github.com/rust-lang-nursery/bitflags/pull/85 119[#86]: https://github.com/rust-lang-nursery/bitflags/pull/86 120[#87]: https://github.com/rust-lang-nursery/bitflags/pull/87 121 122# 0.8.2 123- Update feature flag used when building bitflags as a dependency of the Rust toolchain 124 125# 0.8.1 126- Allow bitflags to be used as a dependency of the Rust toolchain 127 128# 0.8.0 129- Add support for the experimental `i128` and `u128` integer types ([#57]) 130- Add set method: `flags.set(SOME_FLAG, true)` or `flags.set(SOME_FLAG, false)` ([#55]) 131 This may break code that defines its own set method 132 133[#55]: https://github.com/rust-lang-nursery/bitflags/pull/55 134[#57]: https://github.com/rust-lang-nursery/bitflags/pull/57 135 136# 0.7.1 137*(yanked)* 138 139# 0.7.0 140- Implement the Extend trait ([#49]) 141- Allow definitions inside the `bitflags!` macro to refer to items imported from other modules ([#51]) 142 143[#49]: https://github.com/rust-lang-nursery/bitflags/pull/49 144[#51]: https://github.com/rust-lang-nursery/bitflags/pull/51 145 146# 0.6.0 147- The `no_std` feature was removed as it is now the default 148- The `assignment_operators` feature was remove as it is now enabled by default 149- Some clippy suggestions have been applied 150