#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

#7 in #reporting

Download history 37/week @ 2022-11-25 35/week @ 2022-12-02 64/week @ 2022-12-09 43/week @ 2022-12-16 55/week @ 2022-12-23 32/week @ 2022-12-30 35/week @ 2023-01-06 32/week @ 2023-01-13 57/week @ 2023-01-20 48/week @ 2023-01-27 74/week @ 2023-02-03 44/week @ 2023-02-10 71/week @ 2023-02-17 29/week @ 2023-02-24 56/week @ 2023-03-03 41/week @ 2023-03-10

202 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