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

Savefile does not work with latest rust nightly #76

Closed
avl opened this issue Oct 12, 2024 · 2 comments
Closed

Savefile does not work with latest rust nightly #76

avl opened this issue Oct 12, 2024 · 2 comments

Comments

@avl
Copy link
Owner

avl commented Oct 12, 2024

The test-suite fails with lots of errors like:


error: non-local `impl` definition, `impl` blocks should be written at the same level as their item
  --> savefile-test/src/savefile_abi_test/enum_tests.rs:12:1
   |
12 | #[savefile_abi_exportable(version = 0)]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |
   | `__14_` is not local
   | `AbiExportable` is not local
   | move the `impl` block outside of this constant `_` and up 2 bodies
   |
   = note: the attribute macro `savefile_abi_exportable` defines the non-local `impl`, and may need to be changed
   = note: the attribute macro `savefile_abi_exportable` may come from an old version of the `savefile_derive` crate, try updating your dependency with `cargo update -p savefile_derive`
   = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
   = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint
   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
   = note: this error originates in the attribute macro `savefile_abi_exportable` (in Nightly builds, run with -Z macro-backtrace for more info)

This happens in rust nightly from rustc 1.83.0-nightly (1bc403daa 2024-10-11) and newer.

@avl
Copy link
Owner Author

avl commented Oct 13, 2024

Reported to upstream rust rust-lang/rust#131643

@avl
Copy link
Owner Author

avl commented Oct 13, 2024

This will be solved by #77

@avl avl closed this as completed Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant