{
  "id": "rust/e0432-import-could-not-find-module-path",
  "signature": "error[E0432]: unresolved import `crate::module::submodule::Item`",
  "signature_zh": "错误[E0432]：未解析的导入 `crate::module::submodule::Item`",
  "regex": "error\\[E0432\\]: unresolved import `.*`",
  "domain": "rust",
  "category": "build_error",
  "subcategory": null,
  "root_cause": "The specified path in a `use` statement does not match any module, file, or item in the crate's module tree due to missing file, incorrect path, or wrong module visibility.",
  "root_cause_type": "generic",
  "root_cause_zh": "`use` 语句中指定的路径与 crate 模块树中的任何模块、文件或项不匹配，原因是文件缺失、路径不正确或模块可见性错误。",
  "versions": [
    {
      "version": "rustc 1.75.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "rustc 1.76.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "rustc 1.77.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "If the module file (e.g., `submodule.rs`) doesn't exist or isn't declared in `mod.rs`, visibility changes won't help.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This changes the root of the path and is unlikely to resolve the import unless the item is in a different scope; it often leads to another unresolved import error.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This works around the error but is not a fix; it makes code verbose and doesn't address the root cause (e.g., missing file or wrong path).",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Verify the module structure: ensure the file `src/module/submodule.rs` (or `src/module/submodule/mod.rs` for directory modules) exists and is declared in `src/module/mod.rs` with `pub mod submodule;`.",
      "success_rate": 0.95,
      "how": "Verify the module structure: ensure the file `src/module/submodule.rs` (or `src/module/submodule/mod.rs` for directory modules) exists and is declared in `src/module/mod.rs` with `pub mod submodule;`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use `cargo check` to list available items: `cargo doc --open` to view the module tree, or add `#[allow(unused_imports)]` temporarily and use IDE features to auto-complete the correct path.",
      "success_rate": 0.9,
      "how": "Use `cargo check` to list available items: `cargo doc --open` to view the module tree, or add `#[allow(unused_imports)]` temporarily and use IDE features to auto-complete the correct path.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If the module is in a different crate, add it as a dependency in `Cargo.toml` and use `use external_crate::module::submodule::Item;`.",
      "success_rate": 0.85,
      "how": "If the module is in a different crate, add it as a dependency in `Cargo.toml` and use `use external_crate::module::submodule::Item;`.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Verify the module structure: ensure the file `src/module/submodule.rs` (or `src/module/submodule/mod.rs` for directory modules) exists and is declared in `src/module/mod.rs` with `pub mod submodule;`.",
    "Use `cargo check` to list available items: `cargo doc --open` to view the module tree, or add `#[allow(unused_imports)]` temporarily and use IDE features to auto-complete the correct path.",
    "If the module is in a different crate, add it as a dependency in `Cargo.toml` and use `use external_crate::module::submodule::Item;`."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://doc.rust-lang.org/error_codes/E0432.html",
  "official_doc_section": null,
  "error_code": "E0432",
  "verification_tier": "ai_generated",
  "confidence": 0.9,
  "fix_success_rate": 0.95,
  "resolvable": "true",
  "first_seen": "2023-09-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}