Skip to content

Commit a092db2

Browse files
committed
Add 'proc_macro' to configuation options
1 parent 9ca0efe commit a092db2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/conditional-compilation.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ The following configurations must be defined by the implementation:
8484
This can be used to enable extra debugging code in development but not in
8585
production. For example, it controls the behavior of the standard library's
8686
`debug_assert!` macro.
87+
* `proc_macro` - Set when the crate being compiled is being compiled with the
88+
`proc_macro` [crate type].
8789

8890
You can also set another [attribute] based on a `cfg` variable with `cfg_attr`:
8991

@@ -96,4 +98,5 @@ This is the same as `#[b]` if `a` is set by `cfg`, and nothing otherwise.
9698
Lastly, configuration options can be used in expressions by invoking the `cfg!`
9799
macro: `cfg!(a)` evaluates to `true` if `a` is set, and `false` otherwise.
98100

99-
[attribute]: attributes.html
101+
[attribute]: attributes.html
102+
[crate type]: linkage.html

0 commit comments

Comments
 (0)