]>
Commit | Line | Data |
---|---|---|
94222f64 XL |
1 | # 1.3.1\r |
2 | \r | |
3 | - Revert unconditional `#[repr(transparent)]` ([#252])\r | |
4 | \r | |
5 | [#252]: https://github.com/bitflags/bitflags/pull/252\r | |
6 | \r | |
7 | # 1.3.0 (yanked)\r | |
8 | \r | |
9 | - Add `#[repr(transparent)]` ([#187])\r | |
10 | \r | |
11 | - End `empty` doc comment with full stop ([#202])\r | |
12 | \r | |
13 | - Fix typo in crate root docs ([#206])\r | |
14 | \r | |
15 | - Document from_bits_unchecked unsafety ([#207])\r | |
16 | \r | |
17 | - Let `is_all` ignore extra bits ([#211])\r | |
18 | \r | |
19 | - Allows empty flag definition ([#225])\r | |
20 | \r | |
21 | - Making crate accessible from std ([#227])\r | |
22 | \r | |
23 | - Make `from_bits` a const fn ([#229])\r | |
24 | \r | |
25 | - Allow multiple bitflags structs in one macro invocation ([#235])\r | |
26 | \r | |
27 | - Add named functions to perform set operations ([#244])\r | |
28 | \r | |
29 | - Fix typos in method docs ([#245])\r | |
30 | \r | |
31 | - Modernization of the `bitflags` macro to take advantage of newer features and 2018 idioms ([#246])\r | |
32 | \r | |
33 | - Fix regression (in an unreleased feature) and simplify tests ([#247])\r | |
34 | \r | |
35 | - Use `Self` and fix bug when overriding `stringify!` ([#249])\r | |
36 | \r | |
37 | [#187]: https://github.com/bitflags/bitflags/pull/187\r | |
38 | [#202]: https://github.com/bitflags/bitflags/pull/202\r | |
39 | [#206]: https://github.com/bitflags/bitflags/pull/206\r | |
40 | [#207]: https://github.com/bitflags/bitflags/pull/207\r | |
41 | [#211]: https://github.com/bitflags/bitflags/pull/211\r | |
42 | [#225]: https://github.com/bitflags/bitflags/pull/225\r | |
43 | [#227]: https://github.com/bitflags/bitflags/pull/227\r | |
44 | [#229]: https://github.com/bitflags/bitflags/pull/229\r | |
45 | [#235]: https://github.com/bitflags/bitflags/pull/235\r | |
46 | [#244]: https://github.com/bitflags/bitflags/pull/244\r | |
47 | [#245]: https://github.com/bitflags/bitflags/pull/245\r | |
48 | [#246]: https://github.com/bitflags/bitflags/pull/246\r | |
49 | [#247]: https://github.com/bitflags/bitflags/pull/247\r | |
50 | [#249]: https://github.com/bitflags/bitflags/pull/249\r | |
51 | \r | |
52 | # 1.2.1\r | |
53 | \r | |
54 | - Remove extraneous `#[inline]` attributes ([#194])\r | |
55 | \r | |
56 | [#194]: https://github.com/bitflags/bitflags/pull/194\r | |
57 | \r | |
58 | # 1.2.0\r | |
59 | \r | |
60 | - Fix typo: {Lower, Upper}Exp - {Lower, Upper}Hex ([#183])\r | |
61 | \r | |
62 | - Add support for "unknown" bits ([#188])\r | |
63 | \r | |
64 | [#183]: https://github.com/rust-lang-nursery/bitflags/pull/183\r | |
65 | [#188]: https://github.com/rust-lang-nursery/bitflags/pull/188\r | |
66 | \r | |
67 | # 1.1.0\r | |
68 | \r | |
69 | This is a re-release of `1.0.5`, which was yanked due to a bug in the RLS.\r | |
70 | \r | |
71 | # 1.0.5\r | |
72 | \r | |
73 | - Use compiletest_rs flags supported by stable toolchain ([#171])\r | |
74 | \r | |
75 | - Put the user provided attributes first ([#173])\r | |
76 | \r | |
77 | - Make bitflags methods `const` on newer compilers ([#175])\r | |
78 | \r | |
79 | [#171]: https://github.com/rust-lang-nursery/bitflags/pull/171\r | |
80 | [#173]: https://github.com/rust-lang-nursery/bitflags/pull/173\r | |
81 | [#175]: https://github.com/rust-lang-nursery/bitflags/pull/175\r | |
82 | \r | |
83 | # 1.0.4\r | |
84 | \r | |
85 | - Support Rust 2018 style macro imports ([#165])\r | |
86 | \r | |
87 | ```rust\r | |
88 | use bitflags::bitflags;\r | |
89 | ```\r | |
90 | \r | |
91 | [#165]: https://github.com/rust-lang-nursery/bitflags/pull/165\r | |
92 | \r | |
93 | # 1.0.3\r | |
94 | \r | |
95 | - Improve zero value flag handling and documentation ([#157])\r | |
96 | \r | |
97 | [#157]: https://github.com/rust-lang-nursery/bitflags/pull/157\r | |
98 | \r | |
99 | # 1.0.2\r | |
100 | \r | |
101 | - 30% improvement in compile time of bitflags crate ([#156])\r | |
102 | \r | |
103 | - Documentation improvements ([#153])\r | |
104 | \r | |
105 | - Implementation cleanup ([#149])\r | |
106 | \r | |
107 | [#156]: https://github.com/rust-lang-nursery/bitflags/pull/156\r | |
108 | [#153]: https://github.com/rust-lang-nursery/bitflags/pull/153\r | |
109 | [#149]: https://github.com/rust-lang-nursery/bitflags/pull/149\r | |
110 | \r | |
111 | # 1.0.1\r | |
112 | - Add support for `pub(restricted)` specifier on the bitflags struct ([#135])\r | |
113 | - Optimize performance of `all()` when called from a separate crate ([#136])\r | |
114 | \r | |
115 | [#135]: https://github.com/rust-lang-nursery/bitflags/pull/135\r | |
116 | [#136]: https://github.com/rust-lang-nursery/bitflags/pull/136\r | |
117 | \r | |
118 | # 1.0.0\r | |
119 | - **[breaking change]** Macro now generates [associated constants](https://doc.rust-lang.org/reference/items.html#associated-constants) ([#24])\r | |
120 | \r | |
121 | - **[breaking change]** Minimum supported version is Rust **1.20**, due to usage of associated constants\r | |
122 | \r | |
123 | - After being broken in 0.9, the `#[deprecated]` attribute is now supported again ([#112])\r | |
124 | \r | |
125 | - Other improvements to unit tests and documentation ([#106] and [#115])\r | |
126 | \r | |
127 | [#24]: https://github.com/rust-lang-nursery/bitflags/pull/24\r | |
128 | [#106]: https://github.com/rust-lang-nursery/bitflags/pull/106\r | |
129 | [#112]: https://github.com/rust-lang-nursery/bitflags/pull/112\r | |
130 | [#115]: https://github.com/rust-lang-nursery/bitflags/pull/115\r | |
131 | \r | |
132 | ## How to update your code to use associated constants\r | |
133 | Assuming the following structure definition:\r | |
134 | ```rust\r | |
135 | bitflags! {\r | |
136 | struct Something: u8 {\r | |
137 | const FOO = 0b01,\r | |
138 | const BAR = 0b10\r | |
139 | }\r | |
140 | }\r | |
141 | ```\r | |
142 | In 0.9 and older you could do:\r | |
143 | ```rust\r | |
144 | let x = FOO.bits | BAR.bits;\r | |
145 | ```\r | |
146 | Now you must use:\r | |
147 | ```rust\r | |
148 | let x = Something::FOO.bits | Something::BAR.bits;\r | |
149 | ```\r | |
150 | \r | |
151 | # 0.9.1\r | |
152 | - Fix the implementation of `Formatting` traits when other formatting traits were present in scope ([#105])\r | |
153 | \r | |
154 | [#105]: https://github.com/rust-lang-nursery/bitflags/pull/105\r | |
155 | \r | |
156 | # 0.9.0\r | |
157 | - **[breaking change]** Use struct keyword instead of flags to define bitflag types ([#84])\r | |
158 | \r | |
159 | - **[breaking change]** Terminate const items with semicolons instead of commas ([#87])\r | |
160 | \r | |
161 | - Implement the `Hex`, `Octal`, and `Binary` formatting traits ([#86])\r | |
162 | \r | |
163 | - Printing an empty flag value with the `Debug` trait now prints "(empty)" instead of nothing ([#85])\r | |
164 | \r | |
165 | - The `bitflags!` macro can now be used inside of a fn body, to define a type local to that function ([#74])\r | |
166 | \r | |
167 | [#74]: https://github.com/rust-lang-nursery/bitflags/pull/74\r | |
168 | [#84]: https://github.com/rust-lang-nursery/bitflags/pull/84\r | |
169 | [#85]: https://github.com/rust-lang-nursery/bitflags/pull/85\r | |
170 | [#86]: https://github.com/rust-lang-nursery/bitflags/pull/86\r | |
171 | [#87]: https://github.com/rust-lang-nursery/bitflags/pull/87\r | |
172 | \r | |
173 | # 0.8.2\r | |
174 | - Update feature flag used when building bitflags as a dependency of the Rust toolchain\r | |
175 | \r | |
176 | # 0.8.1\r | |
177 | - Allow bitflags to be used as a dependency of the Rust toolchain\r | |
178 | \r | |
179 | # 0.8.0\r | |
180 | - Add support for the experimental `i128` and `u128` integer types ([#57])\r | |
181 | - Add set method: `flags.set(SOME_FLAG, true)` or `flags.set(SOME_FLAG, false)` ([#55])\r | |
182 | This may break code that defines its own set method\r | |
183 | \r | |
184 | [#55]: https://github.com/rust-lang-nursery/bitflags/pull/55\r | |
185 | [#57]: https://github.com/rust-lang-nursery/bitflags/pull/57\r | |
186 | \r | |
187 | # 0.7.1\r | |
188 | *(yanked)*\r | |
189 | \r | |
190 | # 0.7.0\r | |
191 | - Implement the Extend trait ([#49])\r | |
192 | - Allow definitions inside the `bitflags!` macro to refer to items imported from other modules ([#51])\r | |
193 | \r | |
194 | [#49]: https://github.com/rust-lang-nursery/bitflags/pull/49\r | |
195 | [#51]: https://github.com/rust-lang-nursery/bitflags/pull/51\r | |
196 | \r | |
197 | # 0.6.0\r | |
198 | - The `no_std` feature was removed as it is now the default\r | |
199 | - The `assignment_operators` feature was remove as it is now enabled by default\r | |
200 | - Some clippy suggestions have been applied\r |