-
Notifications
You must be signed in to change notification settings - Fork 925
cargo fmt breaks pyo3 #2824
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
Comments
@konstin do you have the diff for the changes rustfmt made please? Even better would be if you could isolate any parts of it which look suspicious - i.e., where Rustfmt has changed more than just whitespace. |
The diff for the |
Got curious about this so did some research into it. This feels like a rustc bug. The offending file is After mod boolobject;
mod bytearray;
mod dict; // <- dict
pub mod exc;
mod floatob;
mod iterator;
mod list;
mod module; // <- module
mod sequence;
mod set;
mod slice;
mod stringdata;
mod stringutils;
mod tuple;
mod typeobject; // <- typeobject This causes the compilation error. I could fix this in two ways.
Also once the crate has been built successfully, it will continue to compile just fine even with Also looking at the error message. That is an impl for |
Thanks @Rantanen! I'll follow up with the compiler team. |
The error message looks correct to me -- although there does not exist an impl of It sounds like there is a bug around incremental compilation, to start. Can you try something for me? If you have one of the configurations that does not error, and you run |
Regardless, seems like something we should file an issue on rustc. |
(Never mind my question, I have reproduced locally.) |
Fixed through rust-lang/rust#52050 |
rusfmt breaks pyo3 in the sense that it doesn't build after running
cargo fmt
.Reproducing:
The last command results in a conflicting implementations error, even though only the formatting should have changed:
Versions:
cargo fmt --version
: rustfmt 0.8.2-nightly (87edd75 2018-06-22)rustc --version
: rustc 1.28.0-nightly (e3bf634 2018-06-28)The text was updated successfully, but these errors were encountered: