1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
use crateCond;
pub const
/// Asserts that all of the passed-in features are enabled.
///
/// # Example
///
/// This example demonstrates the error message when not enough features are enabled.
///
/// ```compile_fail
/// assert_cfg::all!{
/// any(feature = "foo", feature = "bar"),
/// feature = "qux",
/// }
/// ```
///
/// When only the `"foo"` feature is enabled,
/// the above code produces this compile-time error:
/// ```text
/// error[E0080]: evaluation of constant value failed
/// --> src/assert_all.rs:20:1
/// |
/// 4 | / assert_cfg::all!{
/// 5 | | any(feature = "foo", feature = "bar"),
/// 6 | | feature = "qux",
/// 7 | | }
/// | |_^ the evaluated program panicked at '
/// too few features are enabled, these need to be enabled:
/// - `feature = "qux"`
/// ', src/assert_all.rs:4:1
/// |
///
///
/// ```