#macro #reporting #error

nightly compiler_error

Triggerable compiler error

2 releases

Uses old Rust 2015

0.1.1 Jun 9, 2017
0.1.0 Dec 23, 2016

#742 in Rust patterns

Download history 38/week @ 2021-08-10 7/week @ 2021-08-17 24/week @ 2021-08-24 7/week @ 2021-08-31 18/week @ 2021-09-07 11/week @ 2021-09-14 10/week @ 2021-09-21 5/week @ 2021-09-28 5/week @ 2021-10-05 8/week @ 2021-10-12 9/week @ 2021-10-19 14/week @ 2021-10-26 26/week @ 2021-11-02 15/week @ 2021-11-09 20/week @ 2021-11-16 29/week @ 2021-11-23

90 downloads per month

MIT license

3KB

Triggerable custom compiler error

Crates.io LICENSE

compiler_error is a rust compiler plugin that simply triggers a compilation error on demand and prints the token it receives, it is similar to the #error directive in the C preprocessor.

It is quite useful to provide helpful error message in macros with non-trival syntaxes.

Todo

  • support printing optionally multiple tokens
  • provide useful examples

No runtime deps