File tree 1 file changed +5
-0
lines changed
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -286,8 +286,11 @@ pub mod builtin {
286
286
/// better error messages for errornous conditions.
287
287
///
288
288
/// # Examples
289
+ ///
289
290
/// Two such examples are macros and `#[cfg]` environments.
290
291
///
292
+ /// Emit better compiler error if a macro is passed invalid values.
293
+ ///
291
294
/// ```compile_fail
292
295
/// macro_rules! give_me_foo_or_bar {
293
296
/// (foo) => {};
@@ -301,6 +304,8 @@ pub mod builtin {
301
304
/// // ^ will fail at compile time with message "This macro only accepts `foo` or `bar`"
302
305
/// ```
303
306
///
307
+ /// Emit compiler error if one of a number of features isn't available.
308
+ ///
304
309
/// ```compile_fail
305
310
/// #[cfg(not(any(feature = "foo", feature = "bar")))]
306
311
/// compile_error!("Either feature \"foo\" or \"bar\" must be enabled for this crate.")
You can’t perform that action at this time.
0 commit comments