Rust cannot find derive macro `Serialize` in this scope

While trying out some Rust exercises, I came across the following error: $ cargo run --bin iter2 Compiling tutor-web-app-ssr v0.1.0 (/home/kenno/dev/rust/chapter7/ezytutors/tutor-web-app-ssr) error: cannot find derive macro `Serialize` in this scope --> tutor-web-app-ssr/src/bin/iter2.rs:17:10 | 17 | #[derive(Serialize, Deserialize)] | ^^^^^^^^^ | note: `Serialize` is imported here, but it is only a trait, without a derive macro --> tutor-web-app-ssr/src/bin/iter2.rs:5:26 | 5 | use serde::{Deserialize, Serialize}; | ^^^^^^^^^ error: cannot find derive macro `Deserialize` in this scope --> tutor-web-app-ssr/src/bin/iter2....

May 22, 2024 · 1 min · 157 words · kenno