We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider the following example from dtolnay/request-for-implementation#6
r#" #[cfg(feature = "m1")] mod m1; #[cfg_attr(feature = "m2", path = "m2.rs")] #[cfg_attr(not(feature = "m2"), path = "empty.rs")] mod placeholder;
According to that ticket, this should expand to two declarations of mod placeholder, with the cfg_attr being converted to a normal cfg attribute.
mod placeholder
cfg_attr
cfg
I'm not sure this is worth the complexity it creates. Consider the following case:
#[cfg_attr(feature = "foo", path = "m2")] #[cfg_attr(not(feature = "foo"), path = "m3")] mod outer { #[cfg_attr(feature = "foo", path = "baz.rs")] #[cfg_attr(not(feature = "foo"), path = "bar.rs")] mod placeholder; }
We'd need to emit outer twice, with placeholder twice inside.
outer
placeholder
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Consider the following example from dtolnay/request-for-implementation#6
According to that ticket, this should expand to two declarations of
mod placeholder
, with thecfg_attr
being converted to a normalcfg
attribute.I'm not sure this is worth the complexity it creates. Consider the following case:
We'd need to emit
outer
twice, withplaceholder
twice inside.The text was updated successfully, but these errors were encountered: