Skip to content

Commit c9a9bcf

Browse files
committed
Rename cfg.attr.restriction
1 parent 8d3b6db commit c9a9bcf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/conditional-compilation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,8 @@ The syntax for the `cfg` attribute is:
364364
@root CfgAttribute -> `cfg` `(` ConfigurationPredicate `)`
365365
```
366366
367+
r[cfg.attr.allowed-positions]
368+
The `cfg` attribute is allowed anywhere attributes are allowed.
367369

368370
r[cfg.attr.effect]
369371
If the predicate is true, the thing is rewritten to not have the `cfg` attribute on it. If the predicate is false, the thing is removed from the source code.
@@ -372,8 +374,6 @@ r[cfg.attr.crate-level-attrs]
372374
When a crate-level `cfg` has a false predicate, the behavior is slightly different: any crate attributes preceding the `cfg` are kept, and any crate attributes following the `cfg` are removed. This allows `#![no_std]` and `#![no_core]` crates to avoid linking `std`/`core` even if a `#![cfg(...)]` has removed the entire crate.
373375

374376

375-
r[cfg.attr.restriction]
376-
The `cfg` attribute is allowed anywhere attributes are allowed.
377377

378378
r[cfg.cfg_attr]
379379
### The `cfg_attr` attribute

0 commit comments

Comments
 (0)