diff options
| author | Benjamin Sago <ogham@bsago.me> | 2018-05-29 10:07:14 +0200 |
|---|---|---|
| committer | Pietro Albini <pietro@pietroalbini.org> | 2018-06-25 10:34:00 +0200 |
| commit | f85ddfbc3f25b73d41aa9db332dcd72bf70cd985 (patch) | |
| tree | 47ca6f51240404adf3bd0f513d2144c1b93fb6f5 /src | |
| parent | 2d3c369d87af9f8c7c3a718882762bc8896d5a31 (diff) | |
| download | rust-f85ddfbc3f25b73d41aa9db332dcd72bf70cd985.tar.gz rust-f85ddfbc3f25b73d41aa9db332dcd72bf70cd985.zip | |
Add sentence to compile_error!() docs
It now details why using compile_error!() is different from just not having the final macro_rules!() branch.
Diffstat (limited to 'src')
| -rw-r--r-- | src/libstd/macros.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index 935102f8355..75f038407c1 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -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 { |
