Skip to content

Commit b657a5e

Browse files
Apply suggestions from code review
Co-authored-by: Travis Cross <[email protected]>
1 parent 9e49e13 commit b657a5e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

library/core/src/macros/mod.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,14 @@ pub macro assert_matches {
196196
},
197197
}
198198

199-
/// A macro for defining `#[cfg]` match-like statements.
199+
/// Selects code at compile-time based on `cfg` predicates.
200200
///
201-
/// The `cfg_select!` macro checks a series of `#[cfg]` conditions, and picks the branch that
202-
/// belongs to the first condition that evaluates to true.
201+
/// This macro evaluates, at compile-time, a series of `cfg` predicates, selects
202+
/// the first that is true, and emits the code guarded by that predicate. The
203+
/// code guarded by other predicates is not emitted.
203204
///
204-
/// An optional trailing `_` wildcard match arm can be used to specify a fallback branch.
205-
/// If none of the conditions evaluate to `true`, a compile error is emitted.
205+
/// An optional trailing `_` wildcard can be used to specify a fallback. If
206+
/// none of the predicates are true, a [`compile_error`] is emitted.
206207
///
207208
/// # Example
208209
///

0 commit comments

Comments
 (0)