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
52
53
54
55
56
57
58
59
/// Print to `stdout` a build-script instruction for Cargo.
///
/// # Panics
/// If either argument is an empty string.
///
/// (Actually private to the crate, not part of public API. Is only `pub` for old Rust versions.)
/// Tell Cargo to display the given warning message after a build script has finished running.
/// Tell Cargo to pass a key-value configuration option to the compiler to be set for conditional
/// compilation, for features of the Rust compiler, language, or standard library.
///
/// This enables using [the standard conditional-compilation
/// forms](https://doc.rust-lang.org/reference/conditional-compilation.html) (i.e. the `cfg`
/// attribute, et al) for features of Rust itself, in a way that is more similar to Cargo package
/// features.
///
/// `category`: One of `"comp"`, `"lang"`, or `"lib"`.
///
/// `value`: The feature name, which should follow [The Unstable
/// Book](https://doc.rust-lang.org/nightly/unstable-book/index.html) where appropriate.
///
/// # Examples
///
/// Doing `emit_rust_feature("lib", "step_trait")` in a package's build script enables the
/// package's source code to use `#[cfg(rust_lib_feature = "step_trait")]`.
///
/// # Panics
///
/// If `category` is not one of the acceptable categories.
///
/// (Actually private to the crate, not part of public API. Is only `pub` for old Rust versions.)