Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/blob/main/vendor/bitflags/CHANGELOG.md # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienux / vendor / bitflags / CHANGELOG.md` 704 lines · 30887 bytes Raw Blame History Rendered 1 # 2.13.2 2 3 ## What's Changed 4 * Flags: adjust order of elements in manual implementation example by @DanielEScherzer in https://github.com/bitflags/bitflags/pull/494 5 * Re-pull const declarations outside of nested const by @KodrAus in https://github.com/bitflags/bitflags/pull/496 6 7 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.13.1...2.13.2 8 9 # 2.13.1 10 11 ## What's Changed 12 * Lower the LLVM IR output of the generated output by @bolshoytoster in https://github.com/bitflags/bitflags/pull/492 13 14 ## New Contributors 15 * @bolshoytoster made their first contribution in https://github.com/bitflags/bitflags/pull/492 16 17 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.13.0...2.13.1 18 19 # 2.13.0 20 21 ## What's Changed 22 * add `MyFlags::Abc::iter_equal_names()` method by @ssrlive in https://github.com/bitflags/bitflags/pull/489 23 24 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.12.1...2.13.0 25 26 # 2.12.1 27 28 ## What's Changed 29 * Rework the `#[flag_name]` feature and re-stabilize as `#[bitflags(flag_name)]` by @KodrAus in https://github.com/bitflags/bitflags/pull/487 30 31 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.12.0...2.12.1 32 33 # 2.12.0 34 35 ## Yanked 36 37 This release has been yanked because the `#[flag_name]` processing noticeably increases macro recursion, hitting the default limit in cases that are already close to it. 38 39 ## What's Changed 40 * Add a custom `#[flag_name]` attribute by @KodrAus in https://github.com/bitflags/bitflags/pull/483 41 * Add an all_named ctor for filtering out catch-all flags by @KodrAus in https://github.com/bitflags/bitflags/pull/484 42 43 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.11.1...2.12.0 44 45 # 2.11.1 46 47 ## What's Changed 48 * Bless compile-fail tests for current beta by @DanielEScherzer in https://github.com/bitflags/bitflags/pull/478 49 * example_generated.rs: add missing third slash for doc comment by @DanielEScherzer in https://github.com/bitflags/bitflags/pull/477 50 * Clarify self and other in method docs by @KodrAus in https://github.com/bitflags/bitflags/pull/481 51 52 ## New Contributors 53 * @DanielEScherzer made their first contribution in https://github.com/bitflags/bitflags/pull/478 54 55 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.11.0...2.11.1 56 57 # 2.11.0 58 59 ## What's Changed 60 * Fix use of Result in macro output by @james7132 in https://github.com/bitflags/bitflags/pull/462 61 * Add methods to get the known/unknown bits from a flags value by @WaterWhisperer in https://github.com/bitflags/bitflags/pull/473 62 63 ## New Contributors 64 * @james7132 made their first contribution in https://github.com/bitflags/bitflags/pull/462 65 * @WaterWhisperer made their first contribution in https://github.com/bitflags/bitflags/pull/473 66 67 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.10.0...2.11.0 68 69 # 2.10.0 70 71 ## What's Changed 72 * Implement iterator for all named flags by @ssrlive in https://github.com/bitflags/bitflags/pull/465 73 * Depend on serde_core instead of serde by @KodrAus in https://github.com/bitflags/bitflags/pull/467 74 75 ## New Contributors 76 * @ssrlive made their first contribution in https://github.com/bitflags/bitflags/pull/465 77 78 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.9.4...2.10.0 79 80 # 2.9.4 81 82 ## What's Changed 83 * Add Cargo features to readme by @KodrAus in https://github.com/bitflags/bitflags/pull/460 84 85 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.9.3...2.9.4 86 87 # 2.9.3 88 89 ## What's Changed 90 * Streamline generated code by @nnethercote in https://github.com/bitflags/bitflags/pull/458 91 92 ## New Contributors 93 * @nnethercote made their first contribution in https://github.com/bitflags/bitflags/pull/458 94 95 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.9.2...2.9.3 96 97 # 2.9.2 98 99 ## What's Changed 100 * Fix difference in the spec by @KodrAus in https://github.com/bitflags/bitflags/pull/446 101 * Fix up inaccurate docs on bitflags_match by @KodrAus in https://github.com/bitflags/bitflags/pull/453 102 * Remove rustc internal crate feature by @KodrAus in https://github.com/bitflags/bitflags/pull/454 103 104 105 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.9.1...2.9.2 106 107 # 2.9.1 108 109 ## What's Changed 110 * Document Cargo features by @KodrAus in https://github.com/bitflags/bitflags/pull/444 111 112 113 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.9.0...2.9.1 114 115 # 2.9.0 116 117 ## What's Changed 118 * `Flags` trait: add `clear(&mut self)` method by @wysiwys in https://github.com/bitflags/bitflags/pull/437 119 * Fix up UI tests by @KodrAus in https://github.com/bitflags/bitflags/pull/438 120 121 122 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.8.0...2.9.0 123 124 # 2.8.0 125 126 ## What's Changed 127 * feat(core): Add bitflags_match macro for bitflag matching by @YuniqueUnic in https://github.com/bitflags/bitflags/pull/423 128 * Finalize bitflags_match by @KodrAus in https://github.com/bitflags/bitflags/pull/431 129 130 ## New Contributors 131 * @YuniqueUnic made their first contribution in https://github.com/bitflags/bitflags/pull/423 132 133 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.7.0...2.8.0 134 135 # 2.7.0 136 137 ## What's Changed 138 * Fix `clippy::doc_lazy_continuation` lints by @waywardmonkeys in https://github.com/bitflags/bitflags/pull/414 139 * Run clippy on extra features in CI. by @waywardmonkeys in https://github.com/bitflags/bitflags/pull/415 140 * Fix CI: trybuild refresh, allow some clippy restrictions. by @waywardmonkeys in https://github.com/bitflags/bitflags/pull/417 141 * Update zerocopy version in example by @KodrAus in https://github.com/bitflags/bitflags/pull/422 142 * Add method to check if unknown bits are set by @wysiwys in https://github.com/bitflags/bitflags/pull/426 143 * Update error messages by @KodrAus in https://github.com/bitflags/bitflags/pull/427 144 * Add `truncate(&mut self)` method to unset unknown bits by @wysiwys in https://github.com/bitflags/bitflags/pull/428 145 * Update error messages by @KodrAus in https://github.com/bitflags/bitflags/pull/429 146 147 ## New Contributors 148 * @wysiwys made their first contribution in https://github.com/bitflags/bitflags/pull/426 149 150 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.6.0...2.7.0 151 152 # 2.6.0 153 154 ## What's Changed 155 * Sync CHANGELOG.md with github release notes by @dextero in https://github.com/bitflags/bitflags/pull/402 156 * Update error messages and zerocopy by @KodrAus in https://github.com/bitflags/bitflags/pull/403 157 * Bump minimum declared versions of dependencies by @dextero in https://github.com/bitflags/bitflags/pull/404 158 * chore(deps): bump serde_derive and bytemuck versions by @joshka in https://github.com/bitflags/bitflags/pull/405 159 * add OSFF Scorecard workflow by @KodrAus in https://github.com/bitflags/bitflags/pull/396 160 * Update stderr messages by @KodrAus in https://github.com/bitflags/bitflags/pull/408 161 * Fix typo by @waywardmonkeys in https://github.com/bitflags/bitflags/pull/410 162 * Allow specifying outer attributes in impl mode by @KodrAus in https://github.com/bitflags/bitflags/pull/411 163 164 ## New Contributors 165 * @dextero made their first contribution in https://github.com/bitflags/bitflags/pull/402 166 * @joshka made their first contribution in https://github.com/bitflags/bitflags/pull/405 167 * @waywardmonkeys made their first contribution in https://github.com/bitflags/bitflags/pull/410 168 169 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.5.0...2.6.0 170 171 # 2.5.0 172 173 ## What's Changed 174 * Derive `Debug` for `Flag` by @tgross35 in https://github.com/bitflags/bitflags/pull/398 175 * Support truncating or strict-named variants of parsing and formatting by @KodrAus in https://github.com/bitflags/bitflags/pull/400 176 177 ## New Contributors 178 * @tgross35 made their first contribution in https://github.com/bitflags/bitflags/pull/398 179 180 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.4.2...2.5.0 181 182 # 2.4.2 183 184 ## What's Changed 185 * Cargo.toml: Anchor excludes to root of the package by @jamessan in https://github.com/bitflags/bitflags/pull/387 186 * Update error messages by @KodrAus in https://github.com/bitflags/bitflags/pull/390 187 * Add support for impl mode structs to be repr(packed) by @GnomedDev in https://github.com/bitflags/bitflags/pull/388 188 * Remove old `unused_tuple_struct_fields` lint by @dtolnay in https://github.com/bitflags/bitflags/pull/393 189 * Delete use of `local_inner_macros` by @dtolnay in https://github.com/bitflags/bitflags/pull/392 190 191 ## New Contributors 192 * @jamessan made their first contribution in https://github.com/bitflags/bitflags/pull/387 193 * @GnomedDev made their first contribution in https://github.com/bitflags/bitflags/pull/388 194 195 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.4.1...2.4.2 196 197 # 2.4.1 198 199 ## What's Changed 200 * Allow some new pedantic clippy lints by @KodrAus in https://github.com/bitflags/bitflags/pull/380 201 202 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.4.0...2.4.1 203 204 # 2.4.0 205 206 ## What's Changed 207 * Remove html_root_url by @eldruin in https://github.com/bitflags/bitflags/pull/368 208 * Support unnamed flags by @KodrAus in https://github.com/bitflags/bitflags/pull/371 209 * Update smoke test to verify all Clippy and rustc lints by @MitMaro in https://github.com/bitflags/bitflags/pull/374 210 * Specify the behavior of bitflags by @KodrAus in https://github.com/bitflags/bitflags/pull/369 211 212 ## New Contributors 213 * @eldruin made their first contribution in https://github.com/bitflags/bitflags/pull/368 214 * @MitMaro made their first contribution in https://github.com/bitflags/bitflags/pull/374 215 216 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.3.3...2.4.0 217 218 # 2.3.3 219 220 ## Changes to `-=` 221 222 The `-=` operator was incorrectly changed to truncate bits that didn't correspond to valid flags in `2.3.0`. This has 223 been fixed up so it once again behaves the same as `-` and `difference`. 224 225 ## Changes to `!` 226 227 The `!` operator previously called `Self::from_bits_truncate`, which would truncate any bits that only partially 228 overlapped with a valid flag. It will now use `bits & Self::all().bits()`, so any bits that overlap any bits 229 specified by any flag will be respected. This is unlikely to have any practical implications, but enables defining 230 a flag like `const ALL = !0` as a way to signal that any bit pattern is a known set of flags. 231 232 ## Changes to formatting 233 234 Zero-valued flags will never be printed. You'll either get `0x0` for empty flags using debug formatting, or the 235 set of flags with zero-valued flags omitted for others. 236 237 Composite flags will no longer be redundantly printed if there are extra bits to print at the end that don't correspond 238 to a valid flag. 239 240 ## What's Changed 241 * Fix up incorrect sub assign behavior and other cleanups by @KodrAus in https://github.com/bitflags/bitflags/pull/366 242 243 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.3.2...2.3.3 244 245 # 2.3.2 246 247 ## What's Changed 248 * [doc] [src/lib.rs] delete redundant path prefix by @OccupyMars2025 in https://github.com/bitflags/bitflags/pull/361 249 250 ## New Contributors 251 * @OccupyMars2025 made their first contribution in https://github.com/bitflags/bitflags/pull/361 252 253 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.3.1...2.3.2 254 255 # 2.3.1 256 257 ## What's Changed 258 * Fix Self in flags value expressions by @KodrAus in https://github.com/bitflags/bitflags/pull/355 259 260 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.3.0...2.3.1 261 262 # 2.3.0 263 264 ## Major changes 265 266 ### `BitFlags` trait deprecated in favor of `Flags` trait 267 268 This release introduces the `Flags` trait and deprecates the `BitFlags` trait. These two traits are semver compatible so if you have public API code depending on `BitFlags` you can move to `Flags` without breaking end-users. This is possible because the `BitFlags` trait was never publicly implementable, so it now carries `Flags` as a supertrait. All implementations of `Flags` additionally implement `BitFlags`. 269 270 The `Flags` trait is a publicly implementable version of the old `BitFlags` trait. The original `BitFlags` trait carried some macro baggage that made it difficult to implement, so a new `Flags` trait has been introduced as the _One True Trait_ for interacting with flags types generically. See the the `macro_free` and `custom_derive` examples for more details. 271 272 ### `Bits` trait publicly exposed 273 274 The `Bits` trait for the underlying storage of flags values is also now publicly implementable. This lets you define your own exotic backing storage for flags. See the `custom_bits_type` example for more details. 275 276 ## What's Changed 277 * Use explicit hashes for actions steps by @KodrAus in https://github.com/bitflags/bitflags/pull/350 278 * Support ejecting flags types from the bitflags macro by @KodrAus in https://github.com/bitflags/bitflags/pull/351 279 280 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.2.1...2.3.0 281 282 # 2.2.1 283 284 ## What's Changed 285 * Refactor attribute filtering to apply per-flag by @KodrAus in https://github.com/bitflags/bitflags/pull/345 286 287 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.2.0...2.2.1 288 289 # 2.2.0 290 291 ## What's Changed 292 * Create SECURITY.md by @KodrAus in https://github.com/bitflags/bitflags/pull/338 293 * add docs to describe the behavior of multi-bit flags by @nicholasbishop in https://github.com/bitflags/bitflags/pull/340 294 * Add support for bytemuck by @KodrAus in https://github.com/bitflags/bitflags/pull/336 295 * Add a top-level macro for filtering attributes by @KodrAus in https://github.com/bitflags/bitflags/pull/341 296 297 ## New Contributors 298 * @nicholasbishop made their first contribution in https://github.com/bitflags/bitflags/pull/340 299 300 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.1.0...2.2.0 301 302 # 2.1.0 303 304 ## What's Changed 305 * Add docs for the internal Field0 and examples of formatting/parsing by @KodrAus in https://github.com/bitflags/bitflags/pull/328 306 * Add support for arbitrary by @KodrAus in https://github.com/bitflags/bitflags/pull/324 307 * Fix up missing docs for consts within consts by @KodrAus in https://github.com/bitflags/bitflags/pull/330 308 * Ignore clippy lint in generated code by @Jake-Shadle in https://github.com/bitflags/bitflags/pull/331 309 310 ## New Contributors 311 * @Jake-Shadle made their first contribution in https://github.com/bitflags/bitflags/pull/331 312 313 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.0.2...2.1.0 314 315 # 2.0.2 316 317 ## What's Changed 318 * Fix up missing isize and usize Bits impls by @KodrAus in https://github.com/bitflags/bitflags/pull/321 319 320 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.0.1...2.0.2 321 322 # 2.0.1 323 324 ## What's Changed 325 * Fix up some docs issues by @KodrAus in https://github.com/bitflags/bitflags/pull/309 326 * Make empty_flag() const. by @tormeh in https://github.com/bitflags/bitflags/pull/313 327 * Fix formatting of multi-bit flags with partial overlap by @KodrAus in https://github.com/bitflags/bitflags/pull/316 328 329 ## New Contributors 330 * @tormeh made their first contribution in https://github.com/bitflags/bitflags/pull/313 331 332 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.0.0...2.0.1 333 334 # 2.0.0 335 336 ## Major changes 337 338 This release includes some major changes over `1.x`. If you use `bitflags!` types in your public API then upgrading this library may cause breakage in your downstream users. 339 340 ### ⚠️ Serialization 341 342 You'll need to add the `serde` Cargo feature in order to `#[derive(Serialize, Deserialize)]` on your generated flags types: 343 344 ```rust 345 bitflags! { 346 #[derive(Serialize, Deserialize)] 347 #[serde(transparent)] 348 pub struct Flags: T { 349 .. 350 } 351 } 352 ``` 353 354 where `T` is the underlying bits type you're using, such as `u32`. 355 356 The default serialization format with `serde` **has changed** if you `#[derive(Serialize, Deserialize)]` on your generated flags types. It will now use a formatted string for human-readable formats and the underlying bits type for compact formats. 357 358 To keep the old format, see the https://github.com/KodrAus/bitflags-serde-legacy library. 359 360 ### ⚠️ Traits 361 362 Generated flags types now derive fewer traits. If you need to maintain backwards compatibility, you can derive the following yourself: 363 364 ```rust 365 #[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone, Copy)] 366 ``` 367 368 ### ⚠️ Methods 369 370 The unsafe `from_bits_unchecked` method is now a safe `from_bits_retain` method. 371 372 You can add the following method to your generated types to keep them compatible: 373 374 ```rust 375 #[deprecated = "use the safe `from_bits_retain` method instead"] 376 pub unsafe fn from_bits_unchecked(bits: T) -> Self { 377 Self::from_bits_retain(bits) 378 } 379 ``` 380 381 where `T` is the underlying bits type you're using, such as `u32`. 382 383 ### ⚠️ `.bits` field 384 385 You can now use the `.bits()` method instead of the old `.bits`. 386 387 The representation of generated flags types has changed from a struct with the single field `bits` to a newtype. 388 389 ## What's Changed 390 * Fix a typo and call out MSRV bump by @KodrAus in https://github.com/bitflags/bitflags/pull/259 391 * BitFlags trait by @arturoc in https://github.com/bitflags/bitflags/pull/220 392 * Add a hidden trait to discourage manual impls of BitFlags by @KodrAus in https://github.com/bitflags/bitflags/pull/261 393 * Sanitize `Ok` by @konsumlamm in https://github.com/bitflags/bitflags/pull/266 394 * Fix bug in `Debug` implementation by @konsumlamm in https://github.com/bitflags/bitflags/pull/268 395 * Fix a typo in the generated documentation by @wackbyte in https://github.com/bitflags/bitflags/pull/271 396 * Use SPDX license format by @atouchet in https://github.com/bitflags/bitflags/pull/272 397 * serde tests fail in CI by @arturoc in https://github.com/bitflags/bitflags/pull/277 398 * Fix beta test output by @KodrAus in https://github.com/bitflags/bitflags/pull/279 399 * Add example to the README.md file by @tiaanl in https://github.com/bitflags/bitflags/pull/270 400 * Iterator over all the enabled options by @arturoc in https://github.com/bitflags/bitflags/pull/278 401 * from_bits_(truncate) fail with composite flags by @arturoc in https://github.com/bitflags/bitflags/pull/276 402 * Add more platform coverage to CI by @KodrAus in https://github.com/bitflags/bitflags/pull/280 403 * rework the way cfgs are handled by @KodrAus in https://github.com/bitflags/bitflags/pull/281 404 * Split generated code into two types by @KodrAus in https://github.com/bitflags/bitflags/pull/282 405 * expose bitflags iters using nameable types by @KodrAus in https://github.com/bitflags/bitflags/pull/286 406 * Support creating flags from their names by @KodrAus in https://github.com/bitflags/bitflags/pull/287 407 * Update README.md by @KodrAus in https://github.com/bitflags/bitflags/pull/288 408 * Prepare for 2.0.0-rc.1 release by @KodrAus in https://github.com/bitflags/bitflags/pull/289 409 * Add missing "if" to contains doc-comment in traits.rs by @rusty-snake in https://github.com/bitflags/bitflags/pull/291 410 * Forbid unsafe_code by @fintelia in https://github.com/bitflags/bitflags/pull/294 411 * serde: enable no-std support by @nim65s in https://github.com/bitflags/bitflags/pull/296 412 * Add a parser for flags formatted as bar-separated-values by @KodrAus in https://github.com/bitflags/bitflags/pull/297 413 * Prepare for 2.0.0-rc.2 release by @KodrAus in https://github.com/bitflags/bitflags/pull/299 414 * Use strip_prefix instead of starts_with + slice by @QuinnPainter in https://github.com/bitflags/bitflags/pull/301 415 * Fix up some clippy lints by @KodrAus in https://github.com/bitflags/bitflags/pull/302 416 * Prepare for 2.0.0-rc.3 release by @KodrAus in https://github.com/bitflags/bitflags/pull/303 417 * feat: Add minimum permissions to rust.yml workflow by @gabibguti in https://github.com/bitflags/bitflags/pull/305 418 419 ## New Contributors 420 * @wackbyte made their first contribution in https://github.com/bitflags/bitflags/pull/271 421 * @atouchet made their first contribution in https://github.com/bitflags/bitflags/pull/272 422 * @tiaanl made their first contribution in https://github.com/bitflags/bitflags/pull/270 423 * @rusty-snake made their first contribution in https://github.com/bitflags/bitflags/pull/291 424 * @fintelia made their first contribution in https://github.com/bitflags/bitflags/pull/294 425 * @nim65s made their first contribution in https://github.com/bitflags/bitflags/pull/296 426 * @QuinnPainter made their first contribution in https://github.com/bitflags/bitflags/pull/301 427 * @gabibguti made their first contribution in https://github.com/bitflags/bitflags/pull/305 428 429 **Full Changelog**: https://github.com/bitflags/bitflags/compare/1.3.2...2.0.0 430 431 # 2.0.0-rc.3 432 433 ## What's Changed 434 * Use strip_prefix instead of starts_with + slice by @QuinnPainter in https://github.com/bitflags/bitflags/pull/301 435 * Fix up some clippy lints by @KodrAus in https://github.com/bitflags/bitflags/pull/302 436 437 ## New Contributors 438 * @QuinnPainter made their first contribution in https://github.com/bitflags/bitflags/pull/301 439 440 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.0.0-rc.2...2.0.0-rc.3 441 442 # 2.0.0-rc.2 443 444 ## Changes to `serde` serialization 445 446 **⚠️ NOTE ⚠️** This release changes the default serialization you'll get if you `#[derive(Serialize, Deserialize)]` 447 on your generated flags types. It will now use a formatted string for human-readable formats and the underlying bits 448 type for compact formats. 449 450 To keep the old behavior, see the [`bitflags-serde-legacy`](https://github.com/KodrAus/bitflags-serde-legacy) library. 451 452 ## What's Changed 453 454 * Add missing "if" to contains doc-comment in traits.rs by @rusty-snake in https://github.com/bitflags/bitflags/pull/291 455 * Forbid unsafe_code by @fintelia in https://github.com/bitflags/bitflags/pull/294 456 * serde: enable no-std support by @nim65s in https://github.com/bitflags/bitflags/pull/296 457 * Add a parser for flags formatted as bar-separated-values by @KodrAus in https://github.com/bitflags/bitflags/pull/297 458 459 ## New Contributors 460 * @rusty-snake made their first contribution in https://github.com/bitflags/bitflags/pull/291 461 * @fintelia made their first contribution in https://github.com/bitflags/bitflags/pull/294 462 * @nim65s made their first contribution in https://github.com/bitflags/bitflags/pull/296 463 464 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.0.0-rc.1...2.0.0-rc.2 465 466 # 2.0.0-rc.1 467 468 This is a big release including a few years worth of work on a new `BitFlags` trait, iteration, and better macro organization for future extensibility. 469 470 ## What's Changed 471 * Fix a typo and call out MSRV bump by @KodrAus in https://github.com/bitflags/bitflags/pull/259 472 * BitFlags trait by @arturoc in https://github.com/bitflags/bitflags/pull/220 473 * Add a hidden trait to discourage manual impls of BitFlags by @KodrAus in https://github.com/bitflags/bitflags/pull/261 474 * Sanitize `Ok` by @konsumlamm in https://github.com/bitflags/bitflags/pull/266 475 * Fix bug in `Debug` implementation by @konsumlamm in https://github.com/bitflags/bitflags/pull/268 476 * Fix a typo in the generated documentation by @wackbyte in https://github.com/bitflags/bitflags/pull/271 477 * Use SPDX license format by @atouchet in https://github.com/bitflags/bitflags/pull/272 478 * serde tests fail in CI by @arturoc in https://github.com/bitflags/bitflags/pull/277 479 * Fix beta test output by @KodrAus in https://github.com/bitflags/bitflags/pull/279 480 * Add example to the README.md file by @tiaanl in https://github.com/bitflags/bitflags/pull/270 481 * Iterator over all the enabled options by @arturoc in https://github.com/bitflags/bitflags/pull/278 482 * from_bits_(truncate) fail with composite flags by @arturoc in https://github.com/bitflags/bitflags/pull/276 483 * Add more platform coverage to CI by @KodrAus in https://github.com/bitflags/bitflags/pull/280 484 * rework the way cfgs are handled by @KodrAus in https://github.com/bitflags/bitflags/pull/281 485 * Split generated code into two types by @KodrAus in https://github.com/bitflags/bitflags/pull/282 486 * expose bitflags iters using nameable types by @KodrAus in https://github.com/bitflags/bitflags/pull/286 487 * Support creating flags from their names by @KodrAus in https://github.com/bitflags/bitflags/pull/287 488 * Update README.md by @KodrAus in https://github.com/bitflags/bitflags/pull/288 489 490 ## New Contributors 491 * @wackbyte made their first contribution in https://github.com/bitflags/bitflags/pull/271 492 * @atouchet made their first contribution in https://github.com/bitflags/bitflags/pull/272 493 * @tiaanl made their first contribution in https://github.com/bitflags/bitflags/pull/270 494 495 **Full Changelog**: https://github.com/bitflags/bitflags/compare/1.3.2...2.0.0-rc.1 496 497 # 1.3.2 498 499 - Allow `non_snake_case` in generated flags types ([#256]) 500 501 [#256]: https://github.com/bitflags/bitflags/pull/256 502 503 # 1.3.1 504 505 - Revert unconditional `#[repr(transparent)]` ([#252]) 506 507 [#252]: https://github.com/bitflags/bitflags/pull/252 508 509 # 1.3.0 (yanked) 510 511 **This release bumps the Minimum Supported Rust Version to `1.46.0`** 512 513 - Add `#[repr(transparent)]` ([#187]) 514 515 - End `empty` doc comment with full stop ([#202]) 516 517 - Fix typo in crate root docs ([#206]) 518 519 - Document from_bits_unchecked unsafety ([#207]) 520 521 - Let `is_all` ignore extra bits ([#211]) 522 523 - Allows empty flag definition ([#225]) 524 525 - Making crate accessible from std ([#227]) 526 527 - Make `from_bits` a const fn ([#229]) 528 529 - Allow multiple bitflags structs in one macro invocation ([#235]) 530 531 - Add named functions to perform set operations ([#244]) 532 533 - Fix typos in method docs ([#245]) 534 535 - Modernization of the `bitflags` macro to take advantage of newer features and 2018 idioms ([#246]) 536 537 - Fix regression (in an unreleased feature) and simplify tests ([#247]) 538 539 - Use `Self` and fix bug when overriding `stringify!` ([#249]) 540 541 [#187]: https://github.com/bitflags/bitflags/pull/187 542 [#202]: https://github.com/bitflags/bitflags/pull/202 543 [#206]: https://github.com/bitflags/bitflags/pull/206 544 [#207]: https://github.com/bitflags/bitflags/pull/207 545 [#211]: https://github.com/bitflags/bitflags/pull/211 546 [#225]: https://github.com/bitflags/bitflags/pull/225 547 [#227]: https://github.com/bitflags/bitflags/pull/227 548 [#229]: https://github.com/bitflags/bitflags/pull/229 549 [#235]: https://github.com/bitflags/bitflags/pull/235 550 [#244]: https://github.com/bitflags/bitflags/pull/244 551 [#245]: https://github.com/bitflags/bitflags/pull/245 552 [#246]: https://github.com/bitflags/bitflags/pull/246 553 [#247]: https://github.com/bitflags/bitflags/pull/247 554 [#249]: https://github.com/bitflags/bitflags/pull/249 555 556 # 1.2.1 557 558 - Remove extraneous `#[inline]` attributes ([#194]) 559 560 [#194]: https://github.com/bitflags/bitflags/pull/194 561 562 # 1.2.0 563 564 - Fix typo: {Lower, Upper}Exp - {Lower, Upper}Hex ([#183]) 565 566 - Add support for "unknown" bits ([#188]) 567 568 [#183]: https://github.com/rust-lang-nursery/bitflags/pull/183 569 [#188]: https://github.com/rust-lang-nursery/bitflags/pull/188 570 571 # 1.1.0 572 573 This is a re-release of `1.0.5`, which was yanked due to a bug in the RLS. 574 575 # 1.0.5 576 577 - Use compiletest_rs flags supported by stable toolchain ([#171]) 578 579 - Put the user provided attributes first ([#173]) 580 581 - Make bitflags methods `const` on newer compilers ([#175]) 582 583 [#171]: https://github.com/rust-lang-nursery/bitflags/pull/171 584 [#173]: https://github.com/rust-lang-nursery/bitflags/pull/173 585 [#175]: https://github.com/rust-lang-nursery/bitflags/pull/175 586 587 # 1.0.4 588 589 - Support Rust 2018 style macro imports ([#165]) 590 591 ```rust 592 use bitflags::bitflags; 593 ``` 594 595 [#165]: https://github.com/rust-lang-nursery/bitflags/pull/165 596 597 # 1.0.3 598 599 - Improve zero value flag handling and documentation ([#157]) 600 601 [#157]: https://github.com/rust-lang-nursery/bitflags/pull/157 602 603 # 1.0.2 604 605 - 30% improvement in compile time of bitflags crate ([#156]) 606 607 - Documentation improvements ([#153]) 608 609 - Implementation cleanup ([#149]) 610 611 [#156]: https://github.com/rust-lang-nursery/bitflags/pull/156 612 [#153]: https://github.com/rust-lang-nursery/bitflags/pull/153 613 [#149]: https://github.com/rust-lang-nursery/bitflags/pull/149 614 615 # 1.0.1 616 - Add support for `pub(restricted)` specifier on the bitflags struct ([#135]) 617 - Optimize performance of `all()` when called from a separate crate ([#136]) 618 619 [#135]: https://github.com/rust-lang-nursery/bitflags/pull/135 620 [#136]: https://github.com/rust-lang-nursery/bitflags/pull/136 621 622 # 1.0.0 623 - **[breaking change]** Macro now generates [associated constants](https://doc.rust-lang.org/reference/items.html#associated-constants) ([#24]) 624 625 - **[breaking change]** Minimum supported version is Rust **1.20**, due to usage of associated constants 626 627 - After being broken in 0.9, the `#[deprecated]` attribute is now supported again ([#112]) 628 629 - Other improvements to unit tests and documentation ([#106] and [#115]) 630 631 [#24]: https://github.com/rust-lang-nursery/bitflags/pull/24 632 [#106]: https://github.com/rust-lang-nursery/bitflags/pull/106 633 [#112]: https://github.com/rust-lang-nursery/bitflags/pull/112 634 [#115]: https://github.com/rust-lang-nursery/bitflags/pull/115 635 636 ## How to update your code to use associated constants 637 Assuming the following structure definition: 638 ```rust 639 bitflags! { 640 struct Something: u8 { 641 const FOO = 0b01, 642 const BAR = 0b10 643 } 644 } 645 ``` 646 In 0.9 and older you could do: 647 ```rust 648 let x = FOO.bits | BAR.bits; 649 ``` 650 Now you must use: 651 ```rust 652 let x = Something::FOO.bits | Something::BAR.bits; 653 ``` 654 655 # 0.9.1 656 - Fix the implementation of `Formatting` traits when other formatting traits were present in scope ([#105]) 657 658 [#105]: https://github.com/rust-lang-nursery/bitflags/pull/105 659 660 # 0.9.0 661 - **[breaking change]** Use struct keyword instead of flags to define bitflag types ([#84]) 662 663 - **[breaking change]** Terminate const items with semicolons instead of commas ([#87]) 664 665 - Implement the `Hex`, `Octal`, and `Binary` formatting traits ([#86]) 666 667 - Printing an empty flag value with the `Debug` trait now prints "(empty)" instead of nothing ([#85]) 668 669 - The `bitflags!` macro can now be used inside of a fn body, to define a type local to that function ([#74]) 670 671 [#74]: https://github.com/rust-lang-nursery/bitflags/pull/74 672 [#84]: https://github.com/rust-lang-nursery/bitflags/pull/84 673 [#85]: https://github.com/rust-lang-nursery/bitflags/pull/85 674 [#86]: https://github.com/rust-lang-nursery/bitflags/pull/86 675 [#87]: https://github.com/rust-lang-nursery/bitflags/pull/87 676 677 # 0.8.2 678 - Update feature flag used when building bitflags as a dependency of the Rust toolchain 679 680 # 0.8.1 681 - Allow bitflags to be used as a dependency of the Rust toolchain 682 683 # 0.8.0 684 - Add support for the experimental `i128` and `u128` integer types ([#57]) 685 - Add set method: `flags.set(SOME_FLAG, true)` or `flags.set(SOME_FLAG, false)` ([#55]) 686 This may break code that defines its own set method 687 688 [#55]: https://github.com/rust-lang-nursery/bitflags/pull/55 689 [#57]: https://github.com/rust-lang-nursery/bitflags/pull/57 690 691 # 0.7.1 692 *(yanked)* 693 694 # 0.7.0 695 - Implement the Extend trait ([#49]) 696 - Allow definitions inside the `bitflags!` macro to refer to items imported from other modules ([#51]) 697 698 [#49]: https://github.com/rust-lang-nursery/bitflags/pull/49 699 [#51]: https://github.com/rust-lang-nursery/bitflags/pull/51 700 701 # 0.6.0 702 - The `no_std` feature was removed as it is now the default 703 - The `assignment_operators` feature was remove as it is now enabled by default 704 - Some clippy suggestions have been applied