https://github.com/lu-zero/compiler_error
Triggerable compiler errors for rustc < 1.20
https://github.com/lu-zero/compiler_error
Last synced: about 2 months ago
JSON representation
Triggerable compiler errors for rustc < 1.20
- Host: GitHub
- URL: https://github.com/lu-zero/compiler_error
- Owner: lu-zero
- License: mit
- Created: 2016-12-22T23:32:10.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-14T13:51:09.000Z (almost 8 years ago)
- Last Synced: 2024-10-08T16:08:48.238Z (8 months ago)
- Language: Rust
- Homepage:
- Size: 2.93 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Triggerable custom compiler error
[](https://crates.io/crates/compiler_error)
[](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.
## Note
From [Rust 1.20](https://github.com/rust-lang/rust/issues/40872) an identical macro is available directly in the standard library, please use this only for backwards compatibility.