diff options
Diffstat (limited to 'src/doc')
| -rw-r--r-- | src/doc/unstable-book/src/language-features/compile-error.md | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/doc/unstable-book/src/language-features/compile-error.md b/src/doc/unstable-book/src/language-features/compile-error.md new file mode 100644 index 00000000000..1b25eeda3f6 --- /dev/null +++ b/src/doc/unstable-book/src/language-features/compile-error.md @@ -0,0 +1,20 @@ +# `compile_error` + +The tracking issue for this feature is: [#40872] + +[#29599]: https://github.com/rust-lang/rust/issues/40872 + +------------------------ + +The `compile_error` feature adds a macro which will generate a compilation +error with the specified error message. + +## Examples + +```rust +#![feature(compile_error)] + +fn main() { + compile_error!("The error message"); //ERROR The error message +} +``` |
