#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

#736 in Rust patterns

Download history 36/week @ 2022-01-25 32/week @ 2022-02-01 30/week @ 2022-02-08 36/week @ 2022-02-15 30/week @ 2022-02-22 42/week @ 2022-03-01 27/week @ 2022-03-08 30/week @ 2022-03-15 36/week @ 2022-03-22 32/week @ 2022-03-29 33/week @ 2022-04-05 36/week @ 2022-04-12 33/week @ 2022-04-19 36/week @ 2022-04-26 51/week @ 2022-05-03 65/week @ 2022-05-10

192 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