Add sentence to compile_error!() docs
It now details why using compile_error!() is different from just not having the final macro_rules!() branch.
This commit is contained in:
parent
2d3c369d87
commit
f85ddfbc3f
@ -315,7 +315,9 @@ pub mod builtin {
|
||||
///
|
||||
/// Two such examples are macros and `#[cfg]` environments.
|
||||
///
|
||||
/// Emit better compiler error if a macro is passed invalid values.
|
||||
/// Emit better compiler error if a macro is passed invalid values. Without the final branch,
|
||||
/// the compiler would still emit an error, but the error's message would not mention the two
|
||||
/// valid values.
|
||||
///
|
||||
/// ```compile_fail
|
||||
/// macro_rules! give_me_foo_or_bar {
|
||||
|
Loading…
Reference in New Issue
Block a user