Debian Codegraph @

debian/missing-sources/bitflags/CHANGELOG.md

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