Debian Codegraph @

debian/rust-vendor/bitflags/CHANGELOG.md

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