174522d2cSopenharmony_ci# 1.3.2 274522d2cSopenharmony_ci 374522d2cSopenharmony_ci- Allow `non_snake_case` in generated flags types ([#256]) 474522d2cSopenharmony_ci 574522d2cSopenharmony_ci[#252]: https://github.com/bitflags/bitflags/pull/256 674522d2cSopenharmony_ci 774522d2cSopenharmony_ci# 1.3.1 874522d2cSopenharmony_ci 974522d2cSopenharmony_ci- Revert unconditional `#[repr(transparent)]` ([#252]) 1074522d2cSopenharmony_ci 1174522d2cSopenharmony_ci[#252]: https://github.com/bitflags/bitflags/pull/252 1274522d2cSopenharmony_ci 1374522d2cSopenharmony_ci# 1.3.0 (yanked) 1474522d2cSopenharmony_ci 1574522d2cSopenharmony_ci- Add `#[repr(transparent)]` ([#187]) 1674522d2cSopenharmony_ci 1774522d2cSopenharmony_ci- End `empty` doc comment with full stop ([#202]) 1874522d2cSopenharmony_ci 1974522d2cSopenharmony_ci- Fix typo in crate root docs ([#206]) 2074522d2cSopenharmony_ci 2174522d2cSopenharmony_ci- Document from_bits_unchecked unsafety ([#207]) 2274522d2cSopenharmony_ci 2374522d2cSopenharmony_ci- Let `is_all` ignore extra bits ([#211]) 2474522d2cSopenharmony_ci 2574522d2cSopenharmony_ci- Allows empty flag definition ([#225]) 2674522d2cSopenharmony_ci 2774522d2cSopenharmony_ci- Making crate accessible from std ([#227]) 2874522d2cSopenharmony_ci 2974522d2cSopenharmony_ci- Make `from_bits` a const fn ([#229]) 3074522d2cSopenharmony_ci 3174522d2cSopenharmony_ci- Allow multiple bitflags structs in one macro invocation ([#235]) 3274522d2cSopenharmony_ci 3374522d2cSopenharmony_ci- Add named functions to perform set operations ([#244]) 3474522d2cSopenharmony_ci 3574522d2cSopenharmony_ci- Fix typos in method docs ([#245]) 3674522d2cSopenharmony_ci 3774522d2cSopenharmony_ci- Modernization of the `bitflags` macro to take advantage of newer features and 2018 idioms ([#246]) 3874522d2cSopenharmony_ci 3974522d2cSopenharmony_ci- Fix regression (in an unreleased feature) and simplify tests ([#247]) 4074522d2cSopenharmony_ci 4174522d2cSopenharmony_ci- Use `Self` and fix bug when overriding `stringify!` ([#249]) 4274522d2cSopenharmony_ci 4374522d2cSopenharmony_ci[#187]: https://github.com/bitflags/bitflags/pull/187 4474522d2cSopenharmony_ci[#202]: https://github.com/bitflags/bitflags/pull/202 4574522d2cSopenharmony_ci[#206]: https://github.com/bitflags/bitflags/pull/206 4674522d2cSopenharmony_ci[#207]: https://github.com/bitflags/bitflags/pull/207 4774522d2cSopenharmony_ci[#211]: https://github.com/bitflags/bitflags/pull/211 4874522d2cSopenharmony_ci[#225]: https://github.com/bitflags/bitflags/pull/225 4974522d2cSopenharmony_ci[#227]: https://github.com/bitflags/bitflags/pull/227 5074522d2cSopenharmony_ci[#229]: https://github.com/bitflags/bitflags/pull/229 5174522d2cSopenharmony_ci[#235]: https://github.com/bitflags/bitflags/pull/235 5274522d2cSopenharmony_ci[#244]: https://github.com/bitflags/bitflags/pull/244 5374522d2cSopenharmony_ci[#245]: https://github.com/bitflags/bitflags/pull/245 5474522d2cSopenharmony_ci[#246]: https://github.com/bitflags/bitflags/pull/246 5574522d2cSopenharmony_ci[#247]: https://github.com/bitflags/bitflags/pull/247 5674522d2cSopenharmony_ci[#249]: https://github.com/bitflags/bitflags/pull/249 5774522d2cSopenharmony_ci 5874522d2cSopenharmony_ci# 1.2.1 5974522d2cSopenharmony_ci 6074522d2cSopenharmony_ci- Remove extraneous `#[inline]` attributes ([#194]) 6174522d2cSopenharmony_ci 6274522d2cSopenharmony_ci[#194]: https://github.com/bitflags/bitflags/pull/194 6374522d2cSopenharmony_ci 6474522d2cSopenharmony_ci# 1.2.0 6574522d2cSopenharmony_ci 6674522d2cSopenharmony_ci- Fix typo: {Lower, Upper}Exp - {Lower, Upper}Hex ([#183]) 6774522d2cSopenharmony_ci 6874522d2cSopenharmony_ci- Add support for "unknown" bits ([#188]) 6974522d2cSopenharmony_ci 7074522d2cSopenharmony_ci[#183]: https://github.com/rust-lang-nursery/bitflags/pull/183 7174522d2cSopenharmony_ci[#188]: https://github.com/rust-lang-nursery/bitflags/pull/188 7274522d2cSopenharmony_ci 7374522d2cSopenharmony_ci# 1.1.0 7474522d2cSopenharmony_ci 7574522d2cSopenharmony_ciThis is a re-release of `1.0.5`, which was yanked due to a bug in the RLS. 7674522d2cSopenharmony_ci 7774522d2cSopenharmony_ci# 1.0.5 7874522d2cSopenharmony_ci 7974522d2cSopenharmony_ci- Use compiletest_rs flags supported by stable toolchain ([#171]) 8074522d2cSopenharmony_ci 8174522d2cSopenharmony_ci- Put the user provided attributes first ([#173]) 8274522d2cSopenharmony_ci 8374522d2cSopenharmony_ci- Make bitflags methods `const` on newer compilers ([#175]) 8474522d2cSopenharmony_ci 8574522d2cSopenharmony_ci[#171]: https://github.com/rust-lang-nursery/bitflags/pull/171 8674522d2cSopenharmony_ci[#173]: https://github.com/rust-lang-nursery/bitflags/pull/173 8774522d2cSopenharmony_ci[#175]: https://github.com/rust-lang-nursery/bitflags/pull/175 8874522d2cSopenharmony_ci 8974522d2cSopenharmony_ci# 1.0.4 9074522d2cSopenharmony_ci 9174522d2cSopenharmony_ci- Support Rust 2018 style macro imports ([#165]) 9274522d2cSopenharmony_ci 9374522d2cSopenharmony_ci ```rust 9474522d2cSopenharmony_ci use bitflags::bitflags; 9574522d2cSopenharmony_ci ``` 9674522d2cSopenharmony_ci 9774522d2cSopenharmony_ci[#165]: https://github.com/rust-lang-nursery/bitflags/pull/165 9874522d2cSopenharmony_ci 9974522d2cSopenharmony_ci# 1.0.3 10074522d2cSopenharmony_ci 10174522d2cSopenharmony_ci- Improve zero value flag handling and documentation ([#157]) 10274522d2cSopenharmony_ci 10374522d2cSopenharmony_ci[#157]: https://github.com/rust-lang-nursery/bitflags/pull/157 10474522d2cSopenharmony_ci 10574522d2cSopenharmony_ci# 1.0.2 10674522d2cSopenharmony_ci 10774522d2cSopenharmony_ci- 30% improvement in compile time of bitflags crate ([#156]) 10874522d2cSopenharmony_ci 10974522d2cSopenharmony_ci- Documentation improvements ([#153]) 11074522d2cSopenharmony_ci 11174522d2cSopenharmony_ci- Implementation cleanup ([#149]) 11274522d2cSopenharmony_ci 11374522d2cSopenharmony_ci[#156]: https://github.com/rust-lang-nursery/bitflags/pull/156 11474522d2cSopenharmony_ci[#153]: https://github.com/rust-lang-nursery/bitflags/pull/153 11574522d2cSopenharmony_ci[#149]: https://github.com/rust-lang-nursery/bitflags/pull/149 11674522d2cSopenharmony_ci 11774522d2cSopenharmony_ci# 1.0.1 11874522d2cSopenharmony_ci- Add support for `pub(restricted)` specifier on the bitflags struct ([#135]) 11974522d2cSopenharmony_ci- Optimize performance of `all()` when called from a separate crate ([#136]) 12074522d2cSopenharmony_ci 12174522d2cSopenharmony_ci[#135]: https://github.com/rust-lang-nursery/bitflags/pull/135 12274522d2cSopenharmony_ci[#136]: https://github.com/rust-lang-nursery/bitflags/pull/136 12374522d2cSopenharmony_ci 12474522d2cSopenharmony_ci# 1.0.0 12574522d2cSopenharmony_ci- **[breaking change]** Macro now generates [associated constants](https://doc.rust-lang.org/reference/items.html#associated-constants) ([#24]) 12674522d2cSopenharmony_ci 12774522d2cSopenharmony_ci- **[breaking change]** Minimum supported version is Rust **1.20**, due to usage of associated constants 12874522d2cSopenharmony_ci 12974522d2cSopenharmony_ci- After being broken in 0.9, the `#[deprecated]` attribute is now supported again ([#112]) 13074522d2cSopenharmony_ci 13174522d2cSopenharmony_ci- Other improvements to unit tests and documentation ([#106] and [#115]) 13274522d2cSopenharmony_ci 13374522d2cSopenharmony_ci[#24]: https://github.com/rust-lang-nursery/bitflags/pull/24 13474522d2cSopenharmony_ci[#106]: https://github.com/rust-lang-nursery/bitflags/pull/106 13574522d2cSopenharmony_ci[#112]: https://github.com/rust-lang-nursery/bitflags/pull/112 13674522d2cSopenharmony_ci[#115]: https://github.com/rust-lang-nursery/bitflags/pull/115 13774522d2cSopenharmony_ci 13874522d2cSopenharmony_ci## How to update your code to use associated constants 13974522d2cSopenharmony_ciAssuming the following structure definition: 14074522d2cSopenharmony_ci```rust 14174522d2cSopenharmony_cibitflags! { 14274522d2cSopenharmony_ci struct Something: u8 { 14374522d2cSopenharmony_ci const FOO = 0b01, 14474522d2cSopenharmony_ci const BAR = 0b10 14574522d2cSopenharmony_ci } 14674522d2cSopenharmony_ci} 14774522d2cSopenharmony_ci``` 14874522d2cSopenharmony_ciIn 0.9 and older you could do: 14974522d2cSopenharmony_ci```rust 15074522d2cSopenharmony_cilet x = FOO.bits | BAR.bits; 15174522d2cSopenharmony_ci``` 15274522d2cSopenharmony_ciNow you must use: 15374522d2cSopenharmony_ci```rust 15474522d2cSopenharmony_cilet x = Something::FOO.bits | Something::BAR.bits; 15574522d2cSopenharmony_ci``` 15674522d2cSopenharmony_ci 15774522d2cSopenharmony_ci# 0.9.1 15874522d2cSopenharmony_ci- Fix the implementation of `Formatting` traits when other formatting traits were present in scope ([#105]) 15974522d2cSopenharmony_ci 16074522d2cSopenharmony_ci[#105]: https://github.com/rust-lang-nursery/bitflags/pull/105 16174522d2cSopenharmony_ci 16274522d2cSopenharmony_ci# 0.9.0 16374522d2cSopenharmony_ci- **[breaking change]** Use struct keyword instead of flags to define bitflag types ([#84]) 16474522d2cSopenharmony_ci 16574522d2cSopenharmony_ci- **[breaking change]** Terminate const items with semicolons instead of commas ([#87]) 16674522d2cSopenharmony_ci 16774522d2cSopenharmony_ci- Implement the `Hex`, `Octal`, and `Binary` formatting traits ([#86]) 16874522d2cSopenharmony_ci 16974522d2cSopenharmony_ci- Printing an empty flag value with the `Debug` trait now prints "(empty)" instead of nothing ([#85]) 17074522d2cSopenharmony_ci 17174522d2cSopenharmony_ci- The `bitflags!` macro can now be used inside of a fn body, to define a type local to that function ([#74]) 17274522d2cSopenharmony_ci 17374522d2cSopenharmony_ci[#74]: https://github.com/rust-lang-nursery/bitflags/pull/74 17474522d2cSopenharmony_ci[#84]: https://github.com/rust-lang-nursery/bitflags/pull/84 17574522d2cSopenharmony_ci[#85]: https://github.com/rust-lang-nursery/bitflags/pull/85 17674522d2cSopenharmony_ci[#86]: https://github.com/rust-lang-nursery/bitflags/pull/86 17774522d2cSopenharmony_ci[#87]: https://github.com/rust-lang-nursery/bitflags/pull/87 17874522d2cSopenharmony_ci 17974522d2cSopenharmony_ci# 0.8.2 18074522d2cSopenharmony_ci- Update feature flag used when building bitflags as a dependency of the Rust toolchain 18174522d2cSopenharmony_ci 18274522d2cSopenharmony_ci# 0.8.1 18374522d2cSopenharmony_ci- Allow bitflags to be used as a dependency of the Rust toolchain 18474522d2cSopenharmony_ci 18574522d2cSopenharmony_ci# 0.8.0 18674522d2cSopenharmony_ci- Add support for the experimental `i128` and `u128` integer types ([#57]) 18774522d2cSopenharmony_ci- Add set method: `flags.set(SOME_FLAG, true)` or `flags.set(SOME_FLAG, false)` ([#55]) 18874522d2cSopenharmony_ci This may break code that defines its own set method 18974522d2cSopenharmony_ci 19074522d2cSopenharmony_ci[#55]: https://github.com/rust-lang-nursery/bitflags/pull/55 19174522d2cSopenharmony_ci[#57]: https://github.com/rust-lang-nursery/bitflags/pull/57 19274522d2cSopenharmony_ci 19374522d2cSopenharmony_ci# 0.7.1 19474522d2cSopenharmony_ci*(yanked)* 19574522d2cSopenharmony_ci 19674522d2cSopenharmony_ci# 0.7.0 19774522d2cSopenharmony_ci- Implement the Extend trait ([#49]) 19874522d2cSopenharmony_ci- Allow definitions inside the `bitflags!` macro to refer to items imported from other modules ([#51]) 19974522d2cSopenharmony_ci 20074522d2cSopenharmony_ci[#49]: https://github.com/rust-lang-nursery/bitflags/pull/49 20174522d2cSopenharmony_ci[#51]: https://github.com/rust-lang-nursery/bitflags/pull/51 20274522d2cSopenharmony_ci 20374522d2cSopenharmony_ci# 0.6.0 20474522d2cSopenharmony_ci- The `no_std` feature was removed as it is now the default 20574522d2cSopenharmony_ci- The `assignment_operators` feature was remove as it is now enabled by default 20674522d2cSopenharmony_ci- Some clippy suggestions have been applied 207