Skip to content

Commit 2bec12f

Browse files
committed
Add compile_error!() to the unsable book
1 parent 0b29d26 commit 2bec12f

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# `compile_error`
2+
3+
The tracking issue for this feature is: [#40872]
4+
5+
[#29599]: https://github.com/rust-lang/rust/issues/40872
6+
7+
------------------------
8+
9+
The `compile_error` feature adds a macro which will generate a compilation
10+
error with the specified error message.
11+
12+
## Examples
13+
14+
```rust
15+
#![feature(compile_error)]
16+
17+
fn main() {
18+
compile_error!("The error message"); //ERROR The error message
19+
}
20+
```

0 commit comments

Comments
 (0)