RustPython / Parser

MIT License
77 stars 29 forks source link

Cannot compile with Rust 1.76.0 #114

Open rubenfiszel opened 9 months ago

rubenfiszel commented 9 months ago

Works with 1.75.0, but here is the issue with 1.76.0

  --> /home/rfiszel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustpython-ast-0.3.0/src/impls.rs:60:1
   |
60 | static_assertions::assert_eq_size!(crate::Stmt, [u8; 160]);
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: source type: `generic::Stmt` (1216 bits)
   = note: target type: `[u8; 160]` (1280 bits)
   = note: this error originates in the macro `static_assertions::assert_eq_size` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
  --> /home/rfiszel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustpython-ast-0.3.0/src/impls.rs:62:1
   |
62 | static_assertions::assert_eq_size!(crate::Pattern, [u8; 96]);
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: source type: `generic::Pattern` (704 bits)
   = note: target type: `[u8; 96]` (768 bits)
   = note: this error originates in the macro `static_assertions::assert_eq_size` (in Nightly builds, run with -Z macro-backtrace for more info)
olivierlemasle commented 9 months ago

It seems it has been "fixed" in branch main by commenting out the problematic checks: cf 29c4728dbedc7e69cc2560b9b34058bbba9b1303 (at the time where Rust 1.76.0 was still "Nightly")

jansol commented 8 months ago

Would be nice to have a new release that includes that fix.

bnkc commented 7 months ago

Is there an update on when to expect a new release?

youknowone commented 7 months ago

Sorry for inconvenience. I will release a new version.

fanninpm commented 7 months ago

Did the new release fix everyone's problem?

bnkc commented 7 months ago

It did. Thankyou! @youknowone @fanninpm

Drvanon commented 7 months ago

Great that this got fixed! You might want to update the README though.