It seems the following is currently not supported:
#[cfg_attr(target_os = "windows", path = "os_windows.rs)]
mod os;
I've had to do the following:
#[cfg(target_os = "windows")]
mod os_windows;
#[cfg(target_os = "windows")]
use os_windows as os;
The following is not highlighted as code in the doc string
#[cfg_attr(feature = "ci-headless", doc = "```no_run")]
#[cfg_attr(not(feature = "ci-headless"), doc = "```")]
/// Code goes here...
/// ```
Not sure if only because of the missing cfg_attr support, or if there are other factors too.
I've now added cfg_attr support. The code in the original report should now work fine, but there are still some parts of r-a that use syntactical attributes, so they don't handle cfg_attr.
cc #5016
Most helpful comment
I've now added
cfg_attrsupport. The code in the original report should now work fine, but there are still some parts of r-a that use syntactical attributes, so they don't handlecfg_attr.