File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 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.
266266
267267<!-- ignore: `mod` needs multiple files -->
268268``` rust,ignore
269- #[cfg_attr(linux, path = "linux.rs")]
269+ #[cfg_attr(target_os = " linux" , path = "linux.rs")]
270270#[cfg_attr(windows, path = "windows.rs")]
271271mod os;
272272```
@@ -286,9 +286,9 @@ fn bewitched() {}
286286```
287287
288288> ** 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))] `
290290> 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)] ` .
292292
293293The ` cfg_attr ` attribute is allowed anywhere attributes are allowed.
294294
You can’t perform that action at this time.
0 commit comments