From aaf96ca080f549e8e94492e97cb7d556611a4c14 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 8 Dec 2024 14:43:50 +0900 Subject: [PATCH] Fix warning with -Z minimal-versions ``` error: non-local `impl` definition, `impl` blocks should be written at the same level as their item --> src/rt/object.rs:14:43 | 14 | #[cfg_attr(feature = "checkpoint", derive(Serialize, Deserialize))] | -^^^^^^^^ | | | `Store` is not local | `Serialize` is not local | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_Store` | = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_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: `-D non-local-definitions` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(non_local_definitions)]` = note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) ``` --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 30e8fe1..0276231 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ scoped-tls = "1.0.0" generator = "0.8.1" # Requires for "checkpoint" feature -serde = { version = "1.0.92", features = ["derive"], optional = true } +serde = { version = "1.0.113", features = ["derive"], optional = true } serde_json = { version = "1.0.33", optional = true } # Requires for "futures" feature