Skip to content

Commit ad81b59

Browse files
committed
Rename cfg.cfg_attr.restriction
This is to follow the template.
1 parent 478211f commit ad81b59

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/conditional-compilation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,9 @@ The syntax for the `cfg_attr` attribute is:
407407
CfgAttrs -> Attr (`,` Attr)* `,`?
408408
```
409409
410+
r[cfg.cfg_attr.allowed-positions]
411+
The `cfg_attr` attribute is allowed anywhere attributes are allowed.
412+
410413

411414
r[cfg.cfg_attr.behaviour]
412415
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.
@@ -429,9 +432,6 @@ fn bewitched() {}
429432
> [!NOTE]
430433
> The `cfg_attr` can expand to another `cfg_attr`. For example, `#[cfg_attr(target_os = "linux", cfg_attr(feature = "multithreaded", some_other_attribute))]` is valid. This example would be equivalent to `#[cfg_attr(all(target_os = "linux", feature ="multithreaded"), some_other_attribute)]`.
431434
432-
r[cfg.cfg_attr.restriction]
433-
The `cfg_attr` attribute is allowed anywhere attributes are allowed.
434-
435435
The [`crate_type`] and [`crate_name`] attributes cannot be used with `cfg_attr`.
436436

437437
r[cfg.macro]

0 commit comments

Comments
 (0)