File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -266,7 +266,7 @@ either be found at `linux.rs` or `windows.rs` based on the target.
266
266
267
267
<!-- ignore: `mod` needs multiple files -->
268
268
``` rust,ignore
269
- #[cfg_attr(linux, path = "linux.rs")]
269
+ #[cfg_attr(target_os = " linux" , path = "linux.rs")]
270
270
#[cfg_attr(windows, path = "windows.rs")]
271
271
mod os;
272
272
```
@@ -286,9 +286,9 @@ fn bewitched() {}
286
286
```
287
287
288
288
> ** Note** : The ` cfg_attr ` can expand to another ` cfg_attr ` . For example,
289
- > ` #[cfg_attr(linux, cfg_attr(feature = "multithreaded", some_other_attribute))] `
289
+ > ` #[cfg_attr(target_os = " linux" , cfg_attr(feature = "multithreaded", some_other_attribute))] `
290
290
> is valid. This example would be equivalent to
291
- > ` #[cfg_attr(all(linux, feature ="multithreaded"), some_other_attribute)] ` .
291
+ > ` #[cfg_attr(all(target_os = " linux" , feature ="multithreaded"), some_other_attribute)] ` .
292
292
293
293
The ` cfg_attr ` attribute is allowed anywhere attributes are allowed.
294
294
You can’t perform that action at this time.
0 commit comments