I ran this code on my previous desktop and it worked fine:
use serde::Deserialize;
#[derive(Deserialize)]
struct Foo {
bar: i64,
}
fn main() {}
Cargo.toml:
[dependencies]
serde = "1.0"
but now I see
error: cannot find derive macro `Deserialize` in this scope
--> src/main.rs:1:5
|
2 | #[derive(Deserialize)]
| ^^^^^^^^^^^
warning: unused import: `serde::Deserialize`
--> src/main.rs:2:10
|
1 | use serde::Deserialize;
| ^^^^^^^^^^^^^^^^^^
|
= note: #[warn(unused_imports)] on by default
What can cause the issue? I'm using Rust 1.33.0.