We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e6a7f5d + 84b04a9 commit c8953bcCopy full SHA for c8953bc
core/src/macros/mod.rs
@@ -313,6 +313,17 @@ pub macro cfg_match {
313
/// }
314
315
/// ```
316
+///
317
+/// If desired, it is possible to return expressions through the use of surrounding braces:
318
319
+/// ```
320
+/// #![feature(cfg_match)]
321
322
+/// let _some_string = cfg_match! {{
323
+/// unix => { "With great power comes great electricity bills" }
324
+/// _ => { "Behind every successful diet is an unwatched pizza" }
325
+/// }};
326
327
#[cfg(not(bootstrap))]
328
#[unstable(feature = "cfg_match", issue = "115585")]
329
#[rustc_diagnostic_item = "cfg_match"]
0 commit comments