# error[E0433]: failed to resolve: use of undeclared crate or module `my_crate`

  --> src/main.rs:2:5
   |
 2 | use my_crate::some_module;
   |     ^^^^^^^^ use of undeclared crate or module `my_crate`

- **ID:** `rust/e0433-module-not-found-workspace`
- **Domain:** rust
- **Category:** module_error
- **Error Code:** `E0433`
- **Verification:** ai_generated
- **Fix Rate:** 93%

## Root Cause

Attempting to use a crate that is not listed as a dependency in `Cargo.toml`, or a module that is not declared via `mod`.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| rustc 1.73 | active | — | — |
| cargo 1.73 | active | — | — |

## Workarounds

1. **Add the missing crate to `Cargo.toml`: `my_crate = "1.0"` and run `cargo build`.** (95% success)
   ```
   Add the missing crate to `Cargo.toml`: `my_crate = "1.0"` and run `cargo build`.
   ```
2. **If it's a local module, declare it with `mod my_module;` in `main.rs` or `lib.rs`.** (90% success)
   ```
   If it's a local module, declare it with `mod my_module;` in `main.rs` or `lib.rs`.
   ```

## Dead Ends

- **** — Cargo cannot find the crate; no matching package available. (60% fail)
- **** — In Rust 2018+, `extern crate` is rarely needed and still requires the crate to be in dependencies. (80% fail)
