-
Notifications
You must be signed in to change notification settings - Fork 892
New issue
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
Not aware of conditional path attribute #1208
Comments
Although Rustfmt really ought to cope with this, I'd recommend against using this pattern - I'd generally recommend against all uses of the |
In general, I also agree with avoiding mod json {
#[cfg(feature="with-serde")]
mod json_serde;
#[cfg(feature="with-serde")]
pub use json_serde::*;
#[cfg(feature="with-rustc-serialize")]
mod json_rustc_serialize;
#[cfg(feature="with-rustc-serialize")]
pub use json_rustc_serialize::*;
} |
Looks like `path` attributes are invisible to rustfmt: - rust-lang/rustfmt#1208 - rust-lang/rustfmt#2407 Ideally, it would be nice to not use the `path` attribute at all, and we can actually formulate this in a way that doesn't use `path`, but it seems to involve a lot more repetition. It's not at all clear that that's a win here, particularly given that we're only going to have two implementations for a short period of time. Signed-off-by: Christopher Maier <cmaier@chef.io>
Looks like `path` attributes are invisible to rustfmt: - rust-lang/rustfmt#1208 - rust-lang/rustfmt#2407 Ideally, it would be nice to not use the `path` attribute at all, and we can actually formulate this in a way that doesn't use `path`, but it seems to involve a lot more repetition. It's not at all clear that that's a win here, particularly given that we're only going to have two implementations for a short period of time. Signed-off-by: Christopher Maier <cmaier@chef.io>
results in this error preventing
cargo fmt
from completing:I am able to work around it with:
The text was updated successfully, but these errors were encountered: