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:
Benjamin Sago
2018-05-29 10:07:14 +02:00
committed by Pietro Albini
parent 2d3c369d87
commit f85ddfbc3f

View File

@@ -315,7 +315,9 @@ pub mod builtin {
/// ///
/// Two such examples are macros and `#[cfg]` environments. /// 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 /// ```compile_fail
/// macro_rules! give_me_foo_or_bar { /// macro_rules! give_me_foo_or_bar {