{
  "id": "rust/e0432-unresolved-import-crate",
  "signature": "error[E0432]: unresolved import `crate::module::Item`",
  "signature_zh": "错误[E0432]：未解析的导入 `crate::module::Item`",
  "regex": "error\\[E0432\\]: unresolved import `crate::[^`]+`",
  "domain": "rust",
  "category": "module_error",
  "subcategory": null,
  "root_cause": "The specified module or item does not exist in the crate's module tree, often due to missing `mod` declaration or incorrect path.",
  "root_cause_type": "generic",
  "root_cause_zh": "指定的模块或项在 crate 的模块树中不存在，通常是由于缺少 `mod` 声明或路径错误。",
  "versions": [
    {
      "version": "rustc 1.65.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "rustc 1.72.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "rustc 1.80.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The module must be declared with `mod` before re-exporting; otherwise the compiler cannot find it.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The `crate` keyword already refers to the root; `::crate` is redundant and may be invalid.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Rust requires explicit `mod` declarations in `lib.rs` or `main.rs` to include modules.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Ensure the module is declared in the crate root: add `mod module;` to `lib.rs` or `main.rs`, and create the corresponding file `src/module.rs` or directory `src/module/`.",
      "success_rate": 0.95,
      "how": "Ensure the module is declared in the crate root: add `mod module;` to `lib.rs` or `main.rs`, and create the corresponding file `src/module.rs` or directory `src/module/`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If the item is in a submodule, use the correct relative path: `use self::submodule::Item;` or `use super::Item;`.",
      "success_rate": 0.85,
      "how": "If the item is in a submodule, use the correct relative path: `use self::submodule::Item;` or `use super::Item;`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Check for typos in the module or item name and ensure the file exists with the correct casing (case-sensitive on most platforms).",
      "success_rate": 0.9,
      "how": "Check for typos in the module or item name and ensure the file exists with the correct casing (case-sensitive on most platforms).",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Ensure the module is declared in the crate root: add `mod module;` to `lib.rs` or `main.rs`, and create the corresponding file `src/module.rs` or directory `src/module/`.",
    "If the item is in a submodule, use the correct relative path: `use self::submodule::Item;` or `use super::Item;`.",
    "Check for typos in the module or item name and ensure the file exists with the correct casing (case-sensitive on most platforms)."
  ],
  "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.85,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2023-08-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}