github dtolnay/syn 0.11.0

latest releases: 2.0.60, 2.0.59, 2.0.58...
7 years ago

AST changes to reflect changes in rustc

  • Rename ExprKind::Vec to ExprKind::Array
  • Change the content of ExprKind::Closure from a Block to Expr
  • Support expression values for break statements
  • Support attributes on fields in a struct literal expression (FieldValue) and pattern (FieldPat)
  • Add a new type of where predicate - EqPredicate
  • Combine Ty::ObjectSum and Ty::PolyTraitRef into Ty::TraitObject
  • Add Ty::Mac to support macros in type position

Other breaking changes

  • Remove the custom-derive registry that was used for expanding derives on stable rust; real custom derives will be stable very soon
  • Unify BlockCheckMode and Unsafety (#66, thanks @shepmaster)

Non-breaking changes

  • Rename parse_macro_input to parse_derive_input and MacroInput to DeriveInput now that there are other types of procedural macros that are not derives; the old names will continue to work because they have appeared in so many Macros 1.1 guides (#63, thanks @SimonSapin)
  • Support parsing macro invocations that use namespaced paths like a::b!(...)
  • The AST walker syn::visit::Visitor now supports all AST types (#79, thanks @mystor)

Don't miss a new syn release

NewReleases is sending notifications on new releases.