Skip to content

Latest commit

 

History

History
119 lines (85 loc) · 4.88 KB

CHANGELOG.md

File metadata and controls

119 lines (85 loc) · 4.88 KB

Change Log

Changed (breaking)

  • Now automatically-generated codes uses correct Result type (46ba3eb4defa).
    • This is a bugfix.
    • Not Result (which can be local type), but std::result::Result.
    • Now it uses std::... path, opaque_typedef crate supports only Rust 2018.

Added

  • Now Self is available for shortened notation instead of Self_ (44604fa9d6d954ba0b45f20aea9fd84133507a2a).
    • Users can use Foo(Self) instead of Foo(Self_).
    • Self_ will removed in future (but not now).

0.0.4 - 2018-05-30

Changed (non-breaking)

  • Resolve clippy lints (v0.0.206).
  • Bump dependencies.
    • Now opaque_typedef_macro uses syn-0.14 and quote-0.6.

0.0.3 - 2018-04-28

Many operators are now supported!

Added

  • std::ops::* traits (for operators) support (#7).
    • The targets below are added:
      • Arithmetic unary: Neg{,Ref}
      • Arithmetic binary: {Add,Div,Mul,Rem,Sub}{,Assign}{,Ref}{Self,Inner,InnerRev}
      • Bitwise binary: {BitAnd,BitOr,BitXor,Shl,Shr}{,Assign}{,Ref}{Self,Inner,InnerRev}
      • Logical unary: Not{,Ref}

0.0.2 - 2018-04-10

  • opaque_typedef_macros is (almost) completely rewritten!
  • Many errors in README document are fixed.
  • Custom comparator, validator, and generics are supported! 🎉

Added

  • Add shortened notations for As{Mut,Ref}*, Into*: As{Mut,Ref}(*), Into(*) (#3).
    • Note that FooSelf is shortened into Foo(Self_), because Self is reserved keyword and cannot be used here.
  • Accept custom comparator function 🎉 (#4).
    • Note that opaque_typedef_macros users are responsible to keep comparators behaviors consistent.
  • Add derive targets Partial{Eq,Ord}Self and Ord (#4).
    • These are #[derive({PartialEq, PartialOrd, Ord})] with custom comparators.
  • Accept validator function 🎉 (#5).
  • Generics support 🎉 (#8).

Changed (breaking)

  • Add trait methods OpaqueTypedef::try_from_inner and OpaqueTypedefUnsized::try_from_inner{,_mut} (dbd73af).
  • Change return types of trait methods (dbd73af).
    • OpaqueTypedef::from_inner now returns Self, not Result<Self, Self::Error>.
    • OpaqueTypedefUnsized::try_from_inner{,_mut} now returns &{,mut }Self, not Result<&{,mut }Self, Self::Error>.
  • Add std::fmt::Debug trait bound to OpaqueTypedef{,Unsized}::Error type. (dbd73af).
    • Usual error types (typically implements std::error::Error implement std::fmt::Debug and std::fmt::Display, so you may not be affected in most cases.

Changed (non-breaking)

  • Bump dependencies.
    • Use quote ^0.5 and syn ^0.13.1 crates. They had breaking changes (from quote ^0.3 and syn ^0.11), and it is why opaque_typedef_macros is totally rewritten (5bf3c37).
    • Use strum ^0.9.

Fixed (breaking)

  • Require opaque typedef of unsized types to be #[repr(C)] or #[repr(transparent)] (#1).
  • #[opaque_typedef(deref(deref{,mut} = ..))] now don't require #[opaque_typedef(deref(target = ..))].
    • If omitted, the inner type is used as deref target.

0.0.1 - 2017-12-06

Initial release.

Added