PackageTrack
Sign in Get early access

proc-macro-error-attr

Attribute macro for proc-macro-error crate

1.0.4 325M downloads/mo #338 most downloaded on crates.io source

What this package is like to depend on

Last release 6 years ago

no release in 18 months

Release timing varies

gaps range from 1 weeks to 3 months

Nearly every release is documented

notes for 18 of 20 stable releases

Nothing withdrawn

no release was ever pulled

7 years old

22 releases · first in 2019

0 releases in the last 12 months

see the full history below

Release timeline

22 releases · Oct 2019 to Jul 2020
2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 22
  1. 1.0.4 31 Jul 2020
    Release notes
    • SpanRange facility is now public.
    • Docs have been improved.
    • Introduced the syn-error feature so you can opt-out from the syn dependency.
    Open source →
  2. 1.0.3 26 Jun 2020
    Release notes
    • Corrected a few typos.
    • Fixed the emit_call_site_warning macro.
    Open source →
  3. 1.0.2 09 Apr 2020
    Release notes
    • An obsolete note was removed from documentation.
    Open source →
  4. 1.0.1 08 Apr 2020
    Release notes
    • proc-macro-hack is now well tested and supported. Not sure about proc-macro-nested, please fill a request if you need it.
    • Fixed emit_call_site_error.
    • Documentation improvements.
    Open source →
  5. 1.0.0 25 Mar 2020
    Release notes

    I believe the API can be considered stable because it's been a few months without breaking changes, and I also don't think this crate will receive much further evolution. It's perfect, admit it.

    Hence, meet the new, stable release!

    Improvements

    • Supported nested #[proc_macro_error] attributes. Well, you aren't supposed to do that, but I caught myself doing it by accident on one occasion and the behavior was... surprising. Better to handle this smooth.
    Open source →
  6. 0.4.12 23 Mar 2020
    Release notes
    • Error message on macros' misuse is now a bit more understandable.
    Open source →
  7. 0.4.11 02 Mar 2020
    Release notes
    • build.rs no longer fails when rustc date could not be determined, (thanks to Fabian Möller for noticing and to Igor Gnatenko for fixing).
    Open source →
  8. 0.4.10 29 Feb 2020
    Release notes
    • proc-macro-error doesn't depend on syn[full] anymore, the compilation is ~30secs faster.
    Open source →
  9. 0.4.9 13 Feb 2020
    Release notes
    • New function: append_dummy.
    Open source →
  10. 0.4.8 01 Feb 2020
    Release notes
    • Support for children messages
    Open source →
  11. 0.4.7 01 Feb 2020
    Release notes
    • Now any type that implements quote::ToTokens can be used instead of spans. This allows for high quality error messages.
    Open source →
  12. 0.4.6 31 Jan 2020
    Release notes
    • From<syn::Error> implementation doesn't lose span info anymore, see #6.
    Open source →
  13. 0.4.5 19 Jan 2020
    Release notes

    Just a small intermediate release.

    • Fix some bugs.
    • Populate license files into subfolders.
    Open source →
  14. 0.4.3 07 Nov 2019

    Nothing published for this version

  15. 0.4.1 07 Nov 2019
    Release notes
    • Fixed __pme__suggestions not found bug
    • Documentation improvements, links checked
    Open source →
  16. 0.4.0 06 Nov 2019
    Release notes

    New features

    • "help" messages that can have their own span on nightly, they inherit parent span on stable.
      let cond_help = if condition { Some("some help message") else { None } };
      abort!(
          span, // parent span
          "something's wrong, {} wrongs in total", 10; // main message
          help = "here's a help for you, {}", "take it"; // unconditional help message
          help =? cond_help; // conditional help message, must be Option
          note = note_span => "don't forget the note, {}", "would you?" // notes can have their own span but it's effective only on nightly
      )
      
    • Warnings via emit_warning and emit_warning_call_site. Nightly only, they're ignored on stable.
    • Now proc-macro-error delegates to proc_macro::Diagnostic on nightly.

    Breaking changes

    • MacroError is now replaced by Diagnostic. Its API resembles proc_macro::Diagnostic.
    • Diagnostic does not implement From<&str/String> so Result<T, &str/String>::abort_or_exit() won't work anymore (nobody used it anyway).
    • macro_error! macro is replaced with diagnostic!.

    Improvements

    • Now proc-macro-error renders notes exactly just like rustc does.
    • We don't parse a body of a function annotated with #[proc_macro_error] anymore, only looking at the signature. This should somewhat decrease expansion time for large functions.
    Open source →
  17. 0.3.4 20 Oct 2019

    Nothing published for this version

  18. 0.3.3 16 Oct 2019
    Release notes
    • Now you can use any word instead of "help", undocumented.
    Open source →
  19. 0.3.2 16 Oct 2019
    Release notes
    • Introduced support for "help" messages, undocumented.
    Open source →
  20. 0.3.0 08 Oct 2019
    Release notes

    The crate has been completely rewritten from scratch!

    Changes (most are breaking):

    • Renamed macros:
      • span_error => abort
      • call_site_error => abort_call_site
    • filter_macro_errors was replaced by #[proc_macro_error] attribute.
    • set_dummy now takes TokenStream instead of Option<TokenStream>
    • Support for multiple errors via emit_error and emit_call_site_error
    • New macro_error macro for building errors in format=like style.
    • MacroError API had been reconsidered. It also now implements quote::ToTokens.
    Open source →
  21. 0.3.0-rc1 06 Oct 2019 pre-release

    Nothing published for this version

  22. 0.3.0-rc.1 07 Oct 2019 pre-release

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive