Releases: kotauskas/thin_trait_object
Releases · kotauskas/thin_trait_object
1.1.2 — fixed compile errors for traits which have references in method signatures
This patch implements a workaround for a currently known and unfixed compiler bug, #70263, which prevented all traits with #[thin_trait_objects]
which have any references or generic lifetime arguments (which get translated to HRTBs in function pointers) from compiling.
1.1.1 — proper handling of pass-by-value, fixed memory leaks
- Boxed thin trait objects now implement
Drop
as intended. This was not enabled due to an oversight, leading to memory leaks whenever those go out of scope. - Pass-by-value trait methods will now gracefully fail with an error stating that they are not supported yet instead of yielding a compilation failure.
1.1.0 — store_layout and direct access to the vtable
- Fixed output when using the macro on a trait with a
'static
bound while also using marker traits. - Documentation now includes a detailed description of the output produced by the macro, for reference.
- The vtable of a boxed thin trait object can be accessed directly using the new
vtable()
method, which will return a reference to the vtable. - A new configuration option,
store_layout
, was added, which add two fields,size
andalign
, to the vtable, which store the size and the preferred alignment, respectively, of the underlying type.
1.0.1 — fixes for marker_traits(...) and older compiler versions
- Fixed a compilation error in the macro code on Rust 1.46 which was caused by not smart enough inference on that version.
- Fixed output when using
marker_traits(...)
not generating<'_>
when implementing the marker traits for the thin trait object and incorreclty generating+
punctuation in thenew
constructor's bounds onT
.
1.0.0 — initial release
Who needs unit tests anyway