Skip to content
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

Incorrect comma inserted in cfg (CI only) #2969

Closed
nrc opened this issue Aug 26, 2018 · 1 comment
Closed

Incorrect comma inserted in cfg (CI only) #2969

nrc opened this issue Aug 26, 2018 · 1 comment
Labels
bug Panic, non-idempotency, invalid code, etc.

Comments

@nrc
Copy link
Member

nrc commented Aug 26, 2018

E.g.,

#[cfg(not(all(feature="std",
              any(target_os = "linux", target_os = "android",
                  target_os = "netbsd",
                  target_os = "dragonfly",
                  target_os = "haiku",
                  target_os = "emscripten",
                  target_os = "solaris",
                  target_os = "cloudabi",
                  target_os = "macos", target_os = "ios",
                  target_os = "freebsd",
                  target_os = "openbsd", target_os = "bitrig",
                  target_os = "redox",
                  target_os = "fuchsia",
                  windows,
                  all(target_arch = "wasm32", feature = "stdweb"),
                  all(target_arch = "wasm32", feature = "wasm-bindgen"),
))))]
type Os = NoSource;

Changes the last line to ),))].

I can't reproduce this locally, but it seems to be causing rand to fail testing in CI.

@nrc nrc added the bug Panic, non-idempotency, invalid code, etc. label Aug 26, 2018
@nrc nrc added this to the 1.0 (edition rc1) milestone Aug 26, 2018
@topecongiro
Copy link
Contributor

https://github.com/rust-lang-nursery/rustfmt/blob/1c408818c8a752dd584e7858b4afd3ceb011a7da/src/attr.rs#L221-L223

This assumption does not stand when the attribute is nested, and causes rustfmt to be non-idempotent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Panic, non-idempotency, invalid code, etc.
Projects
None yet
Development

No branches or pull requests

2 participants