Skip to content

Releases: kotauskas/thin_trait_object

1.1.2 — fixed compile errors for traits which have references in method signatures

13 Apr 13:04
83be308
Compare
Choose a tag to compare

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

10 Mar 19:56
6fa1bf5
Compare
Choose a tag to compare
  • 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

07 Mar 11:29
9efe4e7
Compare
Choose a tag to compare
  • 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 and align, 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

22 Feb 00:24
d2dd4b3
Compare
Choose a tag to compare
  • 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 the new constructor's bounds on T.

1.0.0 — initial release

22 Feb 00:20
d9d312e
Compare
Choose a tag to compare
Who needs unit tests anyway