Skip to content

v0.4.0

Compare
Choose a tag to compare
@sam0x17 sam0x17 released this 13 Jun 04:16
· 22 commits to main since this release
7a69251

This release contains breaking changes.

Deprecations/Removals:

  • #[use_attr] has been removed
  • #[use_proc] has been removed
  • pretty_print feature has been removed. For a better alternative see my proc-utils crate.
  • Ability to access #[export_tokens] that would normally be inaccessible due to private modules or inaccessible path has been removed

New Features

  • #[import_tokens_proc] and #[import_tokens_attr] now no longer need #[use_attr] and #[use_proc] to be brought into scope properly or re-exported, thanks to a new self-calling macro structure.
  • The MACRO_MAGIC_ROOT/mm_override_path can now also be overridden on #[import_tokens_proc] and #[import_tokens_attr] by passing a path or an expr (the expr option is new). The expr must evaluate to something compatible with Into<String> and must contain a valid path to a macro_magic re-export.
  • New expansion strategy for #[export_tokens] which allows for multiple items with the same name in the same crate (but not at the same path) and enables streamlined importing and re-exporting of macros created via macro_magic,
  • Improved docs for internal items in the core crate
  • Improved docs for custom parsing
  • Additional doc examples