# error[E0432]: unresolved import `crate::module::submodule` -- could not find `submodule` in `module`

- **ID:** `rust/e0432-unresolved-import-could-not-find-module`
- **Domain:** rust
- **Category:** module_error
- **Error Code:** `E0432`
- **Verification:** ai_generated
- **Fix Rate:** 92%

## Root Cause

The submodule file or directory does not exist, or the module declaration is missing in the parent module.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Rust 1.70.0 | active | — | — |
| Rust 1.78.0 | active | — | — |
| Rust 1.82.0 | active | — | — |

## Workarounds

1. **Create the missing file `src/module/submodule.rs` and add `pub mod submodule;` in `src/module/mod.rs` or `src/module.rs`** (95% success)
   ```
   Create the missing file `src/module/submodule.rs` and add `pub mod submodule;` in `src/module/mod.rs` or `src/module.rs`
   ```
2. **If the module is a directory, ensure it contains a `mod.rs` file that declares the submodule** (90% success)
   ```
   If the module is a directory, ensure it contains a `mod.rs` file that declares the submodule
   ```

## Dead Ends

- **Add `pub mod submodule;` to lib.rs or main.rs even if submodule is in a subdirectory** — The declaration must be in the parent module file (e.g., `module/mod.rs` or `module.rs`), not necessarily the crate root. (70% fail)
- **Use `#[path = "path/to/submodule.rs"]` without creating the actual file** — The file must exist on disk; the path attribute only overrides the default lookup path. (85% fail)
