`use` path doesn't resolve to a known item — wrong path, missing dep, or feature flag off.
use serde::Serialize; // E0432: use of undeclared crate or module `serde`
The compiler walked the path and found nothing matching. Common causes:
- The crate isn't in Cargo.toml.
- It's in [dev-dependencies] but used in non-test code.
- A required feature isn't enabled (serde = { version = "1", features = ["derive"] }).
- The module path has a typo or assumes a re-export that doesn't exist.
- cargo add serde --features derive (or hand-edit Cargo.toml).
- Move dev-only deps to [dependencies] if production code needs them.
- Check the crate's docs for the correct path — many libraries re-organise modules between versions.
- Build with cargo check and read the suggestion line — rustc often points at the closest match.