• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Changelog [![Crates.io][crate-badge]][crate]
2All notable changes to this project will be documented in this file.
3
4The format is based on [Keep a Changelog] and this project adheres to
5[Semantic Versioning].
6
7## [Unreleased]
8
9## [1.1.0] - 2019-11-03
10### Added
11- `assert_impl_any!` macro
12- `assert_impl_one!` macro
13- `assert_trait_sub_all!` macro
14- `assert_trait_super_all!` macro
15- Frequently asked questions to `README.md`
16
17### Fixed
18- `assert_eq_size_val!`, `const_assert_eq!`, and `const_assert_ne!` to export
19  their local inner macros. Not having this prevented them from working when
20  `use`d or called directly via `static_assertions::macro!(...)`
21
22### Removed
23- Unused `_assert_obj_safe!` from pre-1.0
24
25## [1.0.0] - 2019-10-02
26### Added
27- `assert_eq_align!` macro
28
29### Removed
30- **[breaking]** Labels from macros that needed them ��
31  - Made possible by [`const _`] in Rust 1.37
32- **[breaking]** `assert_impl!` macro
33
34### Fixed
35- `assert_fields!` now works for `enum` types with multiple variants
36
37### Changed
38- **[breaking]** `const_assert!` macro to only take one expression
39  - Reasoning: when custom error messages are added in the future (via
40    [`assert!`]), having the macro allow for multiple comma-separated
41    expressions may lead to ambiguity
42- **[breaking]** Trait assertions to use `Type: Trait` syntax
43- **[breaking]** Field assertions to use `Type: field1, field2` syntax
44- **[breaking]** Renamed `assert_{ne,eq}_type!` to `assert_type_{ne,eq}_all!`
45
46## [0.3.4] - 2019-06-12
47### Changed
48- Aliased `assert_impl!` to `assert_impl_all!` and deprecated `assert_impl!`
49
50### Added
51- `assert_impl_all!` as replacement to `assert_impl!`
52- `assert_not_impl_all!` and `assert_not_impl_any!` macro counterparts to
53  `assert_impl_all!`
54
55### Fixed
56- `assert_eq_type!` now works with types involving lifetimes
57
58## [0.3.3] - 2019-06-12
59### Added
60- `const_assert_ne!` macro counterpart to `const_assert_eq!`
61
62### Fixed
63- `assert_eq_type!` would pass when types can coerce via `Deref`, such as with
64  `str` and `String`
65
66## [0.3.2] - 2019-05-15
67### Added
68- A `assert_eq_type!` macro that allows for checking whether inputs are the same
69  concrete type
70- A `assert_ne_type!` macro for checking whether inputs all refer to different
71  types
72
73### Fixed
74- `const_assert!` now only takes `bool` values whereas integer (or other type)
75  values could previously be passed
76
77## [0.3.1] - 2018-11-15
78### Fixed
79- Macros that refer to other internal macros can now be imported when compiling
80  for Rust 2018 ([issue
81  #10](https://github.com/nvzqz/static-assertions-rs/issues/10))
82
83## [0.3.0] - 2018-11-14
84### Changed
85- Bumped minimum supported (automatically tested) Rust version to 1.24.0
86- Moved message parameter for `assert_cfg!()` to last argument position, making
87  it consistent with other macros
88
89### Removed
90- No need to use `macro!(label; ...)` syntax when compiling on nightly Rust and
91  enabling the `nightly` feature flag
92
93## [0.2.5] - 2017-12-12
94### Changed
95- `assert_eq_size_ptr` wraps its code inside of a closure, ensuring that the
96  unsafe code inside never runs
97- Clippy no longer warns about `unneeded_field_pattern` within `assert_fields`
98
99### Added
100- Much better documentation with test examples that are guaranteed to fail at
101  compile-time
102
103### Removed
104- Removed testing features; compile failure tests are now done via doc tests
105
106## [0.2.4] - 2017-12-11
107### Removed
108- Removed the actual call to `mem::transmute` while still utilizing it for size
109  verification ([Simon Sapin], [#5])
110
111### Added
112- `assert_cfg` macro that asserts that the given configuration is set
113- `assert_fields` macro to assert that a struct type or enum variant has a given
114  field
115
116### Fixed
117- Allow more generics flexibility in `assert_impl`
118
119## [0.2.3] - 2017-08-24
120### Fixed
121- Trailing commas are now allowed
122
123### Removed
124- Removed clippy warnings
125
126## [0.2.2] - 2017-08-13
127### Added
128- Added `assert_impl` macro to ensure a type implements a given set of traits
129
130## [0.2.1] - 2017-08-13
131### Added
132- Added `assert_obj_safe` macro for ensuring that a trait is object-safe
133
134## [0.2.0] - 2017-08-12
135### Added
136- Added `assert_eq_size_ptr` macro
137
138### Fixed
139- Allow `assert_eq_size`, `const_assert`, and `const_assert_eq` in non-function
140  contexts via providing a unique label [#1]
141
142### Removed
143- **[Breaking]** Semicolon-separated `assert_eq_size` is no longer allowed
144
145## [0.1.1] - 2017-08-12
146### Added
147- Added `const_assert_eq` macro
148
149## 0.1.0 - 2017-08-12
150
151Initial release
152
153[Simon Sapin]: https://github.com/SimonSapin
154
155[`assert!`]: https://doc.rust-lang.org/stable/std/macro.assert.html
156[`const _`]: https://github.com/rust-lang/rfcs/blob/master/text/2526-const-wildcard.md
157
158[#1]: https://github.com/nvzqz/static-assertions-rs/issues/1
159[#5]: https://github.com/nvzqz/static-assertions-rs/pull/5
160
161[crate]:       https://crates.io/crates/static_assertions
162[crate-badge]: https://img.shields.io/crates/v/static_assertions.svg
163
164[Keep a Changelog]:    http://keepachangelog.com/en/1.0.0/
165[Semantic Versioning]: http://semver.org/spec/v2.0.0.html
166
167[Unreleased]: https://github.com/nvzqz/static-assertions-rs/compare/v1.1.0...HEAD
168[1.1.0]: https://github.com/nvzqz/static-assertions-rs/compare/v1.0.0...v1.1.0
169[1.0.0]: https://github.com/nvzqz/static-assertions-rs/compare/v0.3.4...v1.0.0
170[0.3.4]: https://github.com/nvzqz/static-assertions-rs/compare/v0.3.3...v0.3.4
171[0.3.3]: https://github.com/nvzqz/static-assertions-rs/compare/v0.3.2...v0.3.3
172[0.3.2]: https://github.com/nvzqz/static-assertions-rs/compare/v0.3.1...v0.3.2
173[0.3.1]: https://github.com/nvzqz/static-assertions-rs/compare/v0.3.0...v0.3.1
174[0.3.0]: https://github.com/nvzqz/static-assertions-rs/compare/v0.2.5...v0.3.0
175[0.2.5]: https://github.com/nvzqz/static-assertions-rs/compare/v0.2.4...v0.2.5
176[0.2.4]: https://github.com/nvzqz/static-assertions-rs/compare/v0.2.3...v0.2.4
177[0.2.3]: https://github.com/nvzqz/static-assertions-rs/compare/v0.2.2...v0.2.3
178[0.2.2]: https://github.com/nvzqz/static-assertions-rs/compare/v0.2.1...v0.2.2
179[0.2.1]: https://github.com/nvzqz/static-assertions-rs/compare/v0.2.0...v0.2.1
180[0.2.0]: https://github.com/nvzqz/static-assertions-rs/compare/v0.1.1...v0.2.0
181[0.1.1]: https://github.com/nvzqz/static-assertions-rs/compare/v0.1.0...v0.1.1
182