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

offset_of! not stable in Rust v1.63.0 #4408

Closed
marcpabst opened this issue Aug 1, 2024 · 4 comments
Closed

offset_of! not stable in Rust v1.63.0 #4408

marcpabst opened this issue Aug 1, 2024 · 4 comments
Labels

Comments

@marcpabst
Copy link

Bug Description

I think #4254 introduced usage of the offset_of! macro which is not available in the current MSRV.

Steps to Reproduce

Build with v1.63.0

Backtrace

No response

Your operating system and version

n/a

Your Python version (python --version)

n/a

Your Rust version (rustc --version)

< 1.77.0

Your PyO3 version

0.22.2

How did you install python? Did you use a virtualenv?

n/a

Additional Info

No response

@marcpabst marcpabst added the bug label Aug 1, 2024
@alex
Copy link
Contributor

alex commented Aug 1, 2024 via email

@marcpabst
Copy link
Author

I'm seing a error[E0658]: use of unstable library feature 'offset_of':

error[E0658]: use of unstable library feature 'offset_of'
   --> /Users/marc/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pyo3-0.21.0/src/types/capsule.rs:143:26
    |
143 |         debug_assert_eq!(memoffset::offset_of!(CapsuleContents::<T, F>, value), 0);
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #106655 <https://github.com/rust-lang/rust/issues/106655> for more information
    = help: add `#![feature(offset_of)]` to the crate attributes to enable
    = note: this error originates in the macro `_memoffset__offset_of_impl` which comes from the expansion of the macro `memoffset::offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)

@davidhewitt
Copy link
Member

Try running cargo update; looks like a possible memoffset issue from an older version maybe.

Also your error is from a PyO3 0.21 source file so predates #4254

@marcpabst
Copy link
Author

Yeah, looks like it's my messed-up local toolchain which reports as a newer version than what it actually is. I suspect that in turn confuses memoffset - so not actually a Pyo3 issue. Sorry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants