Bug 1888590 - Mark some subtests on trusted-types-event-handlers.html as failing...
[gecko.git] / third_party / rust / bitflags / CHANGELOG.md
blob5081ed5767852e20c88ef1987c8fc9d190e6f02b
1 # 2.4.1
3 ## What's Changed
4 * Allow some new pedantic clippy lints by @KodrAus in https://github.com/bitflags/bitflags/pull/380
6 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.4.0...2.4.1
8 # 2.4.0
10 ## What's Changed
11 * Remove html_root_url by @eldruin in https://github.com/bitflags/bitflags/pull/368
12 * Support unnamed flags by @KodrAus in https://github.com/bitflags/bitflags/pull/371
13 * Update smoke test to verify all Clippy and rustc lints by @MitMaro in https://github.com/bitflags/bitflags/pull/374
14 * Specify the behavior of bitflags by @KodrAus in https://github.com/bitflags/bitflags/pull/369
16 ## New Contributors
17 * @eldruin made their first contribution in https://github.com/bitflags/bitflags/pull/368
18 * @MitMaro made their first contribution in https://github.com/bitflags/bitflags/pull/374
20 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.3.3...2.4.0
22 # 2.3.3
24 ## Changes to `-=`
26 The `-=` operator was incorrectly changed to truncate bits that didn't correspond to valid flags in `2.3.0`. This has
27 been fixed up so it once again behaves the same as `-` and `difference`.
29 ## Changes to `!`
31 The `!` operator previously called `Self::from_bits_truncate`, which would truncate any bits that only partially
32 overlapped with a valid flag. It will now use `bits & Self::all().bits()`, so any bits that overlap any bits
33 specified by any flag will be respected. This is unlikely to have any practical implications, but enables defining
34 a flag like `const ALL = !0` as a way to signal that any bit pattern is a known set of flags.
36 ## Changes to formatting
38 Zero-valued flags will never be printed. You'll either get `0x0` for empty flags using debug formatting, or the
39 set of flags with zero-valued flags omitted for others.
41 Composite flags will no longer be redundantly printed if there are extra bits to print at the end that don't correspond
42 to a valid flag.
44 ## What's Changed
45 * Fix up incorrect sub assign behavior and other cleanups by @KodrAus in https://github.com/bitflags/bitflags/pull/366
47 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.3.2...2.3.3
49 # 2.3.2
51 ## What's Changed
52 * [doc] [src/lib.rs]  delete redundant path prefix by @OccupyMars2025 in https://github.com/bitflags/bitflags/pull/361
54 ## New Contributors
55 * @OccupyMars2025 made their first contribution in https://github.com/bitflags/bitflags/pull/361
57 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.3.1...2.3.2
59 # 2.3.1
61 ## What's Changed
62 * Fix Self in flags value expressions by @KodrAus in https://github.com/bitflags/bitflags/pull/355
64 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.3.0...2.3.1
66 # 2.3.0
68 ## What's Changed
69 * Support ejecting flags types from the bitflags macro by @KodrAus in https://github.com/bitflags/bitflags/pull/351
71 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.2.1...2.3.0
73 # 2.2.1
75 ## What's Changed
76 * Refactor attribute filtering to apply per-flag by @KodrAus in https://github.com/bitflags/bitflags/pull/345
78 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.2.0...2.2.1
80 # 2.2.0
82 ## What's Changed
83 * Create SECURITY.md by @KodrAus in https://github.com/bitflags/bitflags/pull/338
84 * add docs to describe the behavior of multi-bit flags by @nicholasbishop in https://github.com/bitflags/bitflags/pull/340
85 * Add support for bytemuck by @KodrAus in https://github.com/bitflags/bitflags/pull/336
86 * Add a top-level macro for filtering attributes by @KodrAus in https://github.com/bitflags/bitflags/pull/341
88 ## New Contributors
89 * @nicholasbishop made their first contribution in https://github.com/bitflags/bitflags/pull/340
91 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.1.0...2.2.0
93 # 2.1.0
95 ## What's Changed
96 * Add docs for the internal Field0 and examples of formatting/parsing by @KodrAus in https://github.com/bitflags/bitflags/pull/328
97 * Add support for arbitrary by @KodrAus in https://github.com/bitflags/bitflags/pull/324
98 * Fix up missing docs for consts within consts by @KodrAus in https://github.com/bitflags/bitflags/pull/330
99 * Ignore clippy lint in generated code by @Jake-Shadle in https://github.com/bitflags/bitflags/pull/331
101 ## New Contributors
102 * @Jake-Shadle made their first contribution in https://github.com/bitflags/bitflags/pull/331
104 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.0.2...2.1.0
106 # 2.0.2
108 ## What's Changed
109 * Fix up missing isize and usize Bits impls by @KodrAus in https://github.com/bitflags/bitflags/pull/321
111 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.0.1...2.0.2
113 # 2.0.1
115 ## What's Changed
116 * Fix up some docs issues by @KodrAus in https://github.com/bitflags/bitflags/pull/309
117 * Make empty_flag() const. by @tormeh in https://github.com/bitflags/bitflags/pull/313
118 * Fix formatting of multi-bit flags with partial overlap by @KodrAus in https://github.com/bitflags/bitflags/pull/316
120 ## New Contributors
121 * @tormeh made their first contribution in https://github.com/bitflags/bitflags/pull/313
123 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.0.0...2.0.1
125 # 2.0.0
127 ## What's Changed
128 * Fix a typo and call out MSRV bump by @KodrAus in https://github.com/bitflags/bitflags/pull/259
129 * BitFlags trait by @arturoc in https://github.com/bitflags/bitflags/pull/220
130 * Add a hidden trait to discourage manual impls of BitFlags by @KodrAus in https://github.com/bitflags/bitflags/pull/261
131 * Sanitize `Ok` by @konsumlamm in https://github.com/bitflags/bitflags/pull/266
132 * Fix bug in `Debug` implementation by @konsumlamm in https://github.com/bitflags/bitflags/pull/268
133 * Fix a typo in the generated documentation by @wackbyte in https://github.com/bitflags/bitflags/pull/271
134 * Use SPDX license format by @atouchet in https://github.com/bitflags/bitflags/pull/272
135 * serde tests fail in CI by @arturoc in https://github.com/bitflags/bitflags/pull/277
136 * Fix beta test output by @KodrAus in https://github.com/bitflags/bitflags/pull/279
137 * Add example to the README.md file by @tiaanl in https://github.com/bitflags/bitflags/pull/270
138 * Iterator over all the enabled options by @arturoc in https://github.com/bitflags/bitflags/pull/278
139 * from_bits_(truncate) fail with composite flags by @arturoc in https://github.com/bitflags/bitflags/pull/276
140 * Add more platform coverage to CI by @KodrAus in https://github.com/bitflags/bitflags/pull/280
141 * rework the way cfgs are handled by @KodrAus in https://github.com/bitflags/bitflags/pull/281
142 * Split generated code into two types by @KodrAus in https://github.com/bitflags/bitflags/pull/282
143 * expose bitflags iters using nameable types by @KodrAus in https://github.com/bitflags/bitflags/pull/286
144 * Support creating flags from their names by @KodrAus in https://github.com/bitflags/bitflags/pull/287
145 * Update README.md by @KodrAus in https://github.com/bitflags/bitflags/pull/288
146 * Prepare for 2.0.0-rc.1 release by @KodrAus in https://github.com/bitflags/bitflags/pull/289
147 * Add missing "if" to contains doc-comment in traits.rs by @rusty-snake in https://github.com/bitflags/bitflags/pull/291
148 * Forbid unsafe_code by @fintelia in https://github.com/bitflags/bitflags/pull/294
149 * serde: enable no-std support by @nim65s in https://github.com/bitflags/bitflags/pull/296
150 * Add a parser for flags formatted as bar-separated-values by @KodrAus in https://github.com/bitflags/bitflags/pull/297
151 * Prepare for 2.0.0-rc.2 release by @KodrAus in https://github.com/bitflags/bitflags/pull/299
152 * Use strip_prefix instead of starts_with + slice by @QuinnPainter in https://github.com/bitflags/bitflags/pull/301
153 * Fix up some clippy lints by @KodrAus in https://github.com/bitflags/bitflags/pull/302
154 * Prepare for 2.0.0-rc.3 release by @KodrAus in https://github.com/bitflags/bitflags/pull/303
155 * feat: Add minimum permissions to rust.yml workflow by @gabibguti in https://github.com/bitflags/bitflags/pull/305
157 ## New Contributors
158 * @wackbyte made their first contribution in https://github.com/bitflags/bitflags/pull/271
159 * @atouchet made their first contribution in https://github.com/bitflags/bitflags/pull/272
160 * @tiaanl made their first contribution in https://github.com/bitflags/bitflags/pull/270
161 * @rusty-snake made their first contribution in https://github.com/bitflags/bitflags/pull/291
162 * @fintelia made their first contribution in https://github.com/bitflags/bitflags/pull/294
163 * @nim65s made their first contribution in https://github.com/bitflags/bitflags/pull/296
164 * @QuinnPainter made their first contribution in https://github.com/bitflags/bitflags/pull/301
165 * @gabibguti made their first contribution in https://github.com/bitflags/bitflags/pull/305
167 **Full Changelog**: https://github.com/bitflags/bitflags/compare/1.3.2...2.0.0
169 # 2.0.0-rc.3
171 ## What's Changed
172 * Use strip_prefix instead of starts_with + slice by @QuinnPainter in https://github.com/bitflags/bitflags/pull/301
173 * Fix up some clippy lints by @KodrAus in https://github.com/bitflags/bitflags/pull/302
175 ## New Contributors
176 * @QuinnPainter made their first contribution in https://github.com/bitflags/bitflags/pull/301
178 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.0.0-rc.2...2.0.0-rc.3
180 # 2.0.0-rc.2
182 ## Changes to `serde` serialization
184 **⚠️ NOTE ⚠️** This release changes the default serialization you'll get if you `#[derive(Serialize, Deserialize)]`
185 on your generated flags types. It will now use a formatted string for human-readable formats and the underlying bits
186 type for compact formats.
188 To keep the old behavior, see the [`bitflags-serde-legacy`](https://github.com/KodrAus/bitflags-serde-legacy) library.
190 ## What's Changed
192 * Add missing "if" to contains doc-comment in traits.rs by @rusty-snake in https://github.com/bitflags/bitflags/pull/291
193 * Forbid unsafe_code by @fintelia in https://github.com/bitflags/bitflags/pull/294
194 * serde: enable no-std support by @nim65s in https://github.com/bitflags/bitflags/pull/296
195 * Add a parser for flags formatted as bar-separated-values by @KodrAus in https://github.com/bitflags/bitflags/pull/297
197 ## New Contributors
198 * @rusty-snake made their first contribution in https://github.com/bitflags/bitflags/pull/291
199 * @fintelia made their first contribution in https://github.com/bitflags/bitflags/pull/294
200 * @nim65s made their first contribution in https://github.com/bitflags/bitflags/pull/296
202 **Full Changelog**: https://github.com/bitflags/bitflags/compare/2.0.0-rc.1...2.0.0-rc.2
204 # 2.0.0-rc.1
206 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.
208 ## What's Changed
209 * Fix a typo and call out MSRV bump by @KodrAus in https://github.com/bitflags/bitflags/pull/259
210 * BitFlags trait by @arturoc in https://github.com/bitflags/bitflags/pull/220
211 * Add a hidden trait to discourage manual impls of BitFlags by @KodrAus in https://github.com/bitflags/bitflags/pull/261
212 * Sanitize `Ok` by @konsumlamm in https://github.com/bitflags/bitflags/pull/266
213 * Fix bug in `Debug` implementation by @konsumlamm in https://github.com/bitflags/bitflags/pull/268
214 * Fix a typo in the generated documentation by @wackbyte in https://github.com/bitflags/bitflags/pull/271
215 * Use SPDX license format by @atouchet in https://github.com/bitflags/bitflags/pull/272
216 * serde tests fail in CI by @arturoc in https://github.com/bitflags/bitflags/pull/277
217 * Fix beta test output by @KodrAus in https://github.com/bitflags/bitflags/pull/279
218 * Add example to the README.md file by @tiaanl in https://github.com/bitflags/bitflags/pull/270
219 * Iterator over all the enabled options by @arturoc in https://github.com/bitflags/bitflags/pull/278
220 * from_bits_(truncate) fail with composite flags by @arturoc in https://github.com/bitflags/bitflags/pull/276
221 * Add more platform coverage to CI by @KodrAus in https://github.com/bitflags/bitflags/pull/280
222 * rework the way cfgs are handled by @KodrAus in https://github.com/bitflags/bitflags/pull/281
223 * Split generated code into two types by @KodrAus in https://github.com/bitflags/bitflags/pull/282
224 * expose bitflags iters using nameable types by @KodrAus in https://github.com/bitflags/bitflags/pull/286
225 * Support creating flags from their names by @KodrAus in https://github.com/bitflags/bitflags/pull/287
226 * Update README.md by @KodrAus in https://github.com/bitflags/bitflags/pull/288
228 ## New Contributors
229 * @wackbyte made their first contribution in https://github.com/bitflags/bitflags/pull/271
230 * @atouchet made their first contribution in https://github.com/bitflags/bitflags/pull/272
231 * @tiaanl made their first contribution in https://github.com/bitflags/bitflags/pull/270
233 **Full Changelog**: https://github.com/bitflags/bitflags/compare/1.3.2...2.0.0-rc.1
235 # 1.3.2
237 - Allow `non_snake_case` in generated flags types ([#256])
239 [#256]: https://github.com/bitflags/bitflags/pull/256
241 # 1.3.1
243 - Revert unconditional `#[repr(transparent)]` ([#252])
245 [#252]: https://github.com/bitflags/bitflags/pull/252
247 # 1.3.0 (yanked)
249 **This release bumps the Minimum Supported Rust Version to `1.46.0`**
251 - Add `#[repr(transparent)]` ([#187])
253 - End `empty` doc comment with full stop ([#202])
255 - Fix typo in crate root docs ([#206])
257 - Document from_bits_unchecked unsafety ([#207])
259 - Let `is_all` ignore extra bits ([#211])
261 - Allows empty flag definition ([#225])
263 - Making crate accessible from std ([#227])
265 - Make `from_bits` a const fn ([#229])
267 - Allow multiple bitflags structs in one macro invocation ([#235])
269 - Add named functions to perform set operations ([#244])
271 - Fix typos in method docs ([#245])
273 - Modernization of the `bitflags` macro to take advantage of newer features and 2018 idioms ([#246])
275 - Fix regression (in an unreleased feature) and simplify tests ([#247])
277 - Use `Self` and fix bug when overriding `stringify!` ([#249])
279 [#187]: https://github.com/bitflags/bitflags/pull/187
280 [#202]: https://github.com/bitflags/bitflags/pull/202
281 [#206]: https://github.com/bitflags/bitflags/pull/206
282 [#207]: https://github.com/bitflags/bitflags/pull/207
283 [#211]: https://github.com/bitflags/bitflags/pull/211
284 [#225]: https://github.com/bitflags/bitflags/pull/225
285 [#227]: https://github.com/bitflags/bitflags/pull/227
286 [#229]: https://github.com/bitflags/bitflags/pull/229
287 [#235]: https://github.com/bitflags/bitflags/pull/235
288 [#244]: https://github.com/bitflags/bitflags/pull/244
289 [#245]: https://github.com/bitflags/bitflags/pull/245
290 [#246]: https://github.com/bitflags/bitflags/pull/246
291 [#247]: https://github.com/bitflags/bitflags/pull/247
292 [#249]: https://github.com/bitflags/bitflags/pull/249
294 # 1.2.1
296 - Remove extraneous `#[inline]` attributes ([#194])
298 [#194]: https://github.com/bitflags/bitflags/pull/194
300 # 1.2.0
302 - Fix typo: {Lower, Upper}Exp - {Lower, Upper}Hex ([#183])
304 - Add support for "unknown" bits ([#188])
306 [#183]: https://github.com/rust-lang-nursery/bitflags/pull/183
307 [#188]: https://github.com/rust-lang-nursery/bitflags/pull/188
309 # 1.1.0
311 This is a re-release of `1.0.5`, which was yanked due to a bug in the RLS.
313 # 1.0.5
315 - Use compiletest_rs flags supported by stable toolchain ([#171])
317 - Put the user provided attributes first ([#173])
319 - Make bitflags methods `const` on newer compilers ([#175])
321 [#171]: https://github.com/rust-lang-nursery/bitflags/pull/171
322 [#173]: https://github.com/rust-lang-nursery/bitflags/pull/173
323 [#175]: https://github.com/rust-lang-nursery/bitflags/pull/175
325 # 1.0.4
327 - Support Rust 2018 style macro imports ([#165])
329   ```rust
330   use bitflags::bitflags;
331   ```
333 [#165]: https://github.com/rust-lang-nursery/bitflags/pull/165
335 # 1.0.3
337 - Improve zero value flag handling and documentation ([#157])
339 [#157]: https://github.com/rust-lang-nursery/bitflags/pull/157
341 # 1.0.2
343 - 30% improvement in compile time of bitflags crate ([#156])
345 - Documentation improvements ([#153])
347 - Implementation cleanup ([#149])
349 [#156]: https://github.com/rust-lang-nursery/bitflags/pull/156
350 [#153]: https://github.com/rust-lang-nursery/bitflags/pull/153
351 [#149]: https://github.com/rust-lang-nursery/bitflags/pull/149
353 # 1.0.1
354 - Add support for `pub(restricted)` specifier on the bitflags struct ([#135])
355 - Optimize performance of `all()` when called from a separate crate ([#136])
357 [#135]: https://github.com/rust-lang-nursery/bitflags/pull/135
358 [#136]: https://github.com/rust-lang-nursery/bitflags/pull/136
360 # 1.0.0
361 - **[breaking change]** Macro now generates [associated constants](https://doc.rust-lang.org/reference/items.html#associated-constants) ([#24])
363 - **[breaking change]** Minimum supported version is Rust **1.20**, due to usage of associated constants
365 - After being broken in 0.9, the `#[deprecated]` attribute is now supported again ([#112])
367 - Other improvements to unit tests and documentation ([#106] and [#115])
369 [#24]: https://github.com/rust-lang-nursery/bitflags/pull/24
370 [#106]: https://github.com/rust-lang-nursery/bitflags/pull/106
371 [#112]: https://github.com/rust-lang-nursery/bitflags/pull/112
372 [#115]: https://github.com/rust-lang-nursery/bitflags/pull/115
374 ## How to update your code to use associated constants
375 Assuming the following structure definition:
376 ```rust
377 bitflags! {
378   struct Something: u8 {
379      const FOO = 0b01,
380      const BAR = 0b10
381   }
384 In 0.9 and older you could do:
385 ```rust
386 let x = FOO.bits | BAR.bits;
388 Now you must use:
389 ```rust
390 let x = Something::FOO.bits | Something::BAR.bits;
393 # 0.9.1
394 - Fix the implementation of `Formatting` traits when other formatting traits were present in scope ([#105])
396 [#105]: https://github.com/rust-lang-nursery/bitflags/pull/105
398 # 0.9.0
399 - **[breaking change]** Use struct keyword instead of flags to define bitflag types ([#84])
401 - **[breaking change]** Terminate const items with semicolons instead of commas ([#87])
403 - Implement the `Hex`, `Octal`, and `Binary` formatting traits ([#86])
405 - Printing an empty flag value with the `Debug` trait now prints "(empty)" instead of nothing ([#85])
407 - The `bitflags!` macro can now be used inside of a fn body, to define a type local to that function ([#74])
409 [#74]: https://github.com/rust-lang-nursery/bitflags/pull/74
410 [#84]: https://github.com/rust-lang-nursery/bitflags/pull/84
411 [#85]: https://github.com/rust-lang-nursery/bitflags/pull/85
412 [#86]: https://github.com/rust-lang-nursery/bitflags/pull/86
413 [#87]: https://github.com/rust-lang-nursery/bitflags/pull/87
415 # 0.8.2
416 - Update feature flag used when building bitflags as a dependency of the Rust toolchain
418 # 0.8.1
419 - Allow bitflags to be used as a dependency of the Rust toolchain
421 # 0.8.0
422 - Add support for the experimental `i128` and `u128` integer types ([#57])
423 - Add set method: `flags.set(SOME_FLAG, true)` or `flags.set(SOME_FLAG, false)` ([#55])
424   This may break code that defines its own set method
426 [#55]: https://github.com/rust-lang-nursery/bitflags/pull/55
427 [#57]: https://github.com/rust-lang-nursery/bitflags/pull/57
429 # 0.7.1
430 *(yanked)*
432 # 0.7.0
433 - Implement the Extend trait ([#49])
434 - Allow definitions inside the `bitflags!` macro to refer to items imported from other modules ([#51])
436 [#49]: https://github.com/rust-lang-nursery/bitflags/pull/49
437 [#51]: https://github.com/rust-lang-nursery/bitflags/pull/51
439 # 0.6.0
440 - The `no_std` feature was removed as it is now the default
441 - The `assignment_operators` feature was remove as it is now enabled by default
442 - Some clippy suggestions have been applied