Skip to content

Commit 62279d1

Browse files
committed
Rename cfg.cfg_attr.general and move to the start
1 parent cd51013 commit 62279d1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/conditional-compilation.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,15 +385,16 @@ The `cfg` attribute is allowed anywhere attributes are allowed.
385385
r[cfg.cfg_attr]
386386
### The `cfg_attr` attribute
387387

388+
r[cfg.cfg_attr.intro]
389+
The *`cfg_attr` [attribute]* conditionally includes attributes based on a configuration predicate.
390+
388391
r[cfg.cfg_attr.syntax]
389392
```grammar,configuration
390393
@root CfgAttrAttribute -> `cfg_attr` `(` ConfigurationPredicate `,` CfgAttrs? `)`
391394
392395
CfgAttrs -> Attr (`,` Attr)* `,`?
393396
```
394397

395-
r[cfg.cfg_attr.general]
396-
The `cfg_attr` [attribute] conditionally includes [attributes] based on a configuration predicate.
397398

398399
r[cfg.cfg_attr.behaviour]
399400
When the configuration predicate is true, this attribute expands out to the attributes listed after the predicate. For example, the following module will either be found at `linux.rs` or `windows.rs` based on the target.

0 commit comments

Comments
 (0)