{
  "id": "rust/e0432-unresolved-import-self",
  "signature": "error[E0432]: unresolved import `crate::module::self`",
  "signature_zh": "错误[E0432]：未解析的导入 `crate::module::self`",
  "regex": "error\\[E0432\\]: unresolved import `.*::self`",
  "domain": "rust",
  "category": "module_error",
  "subcategory": null,
  "root_cause": "Using `self` in a use path incorrectly; `self` should be used to refer to the current module, not as a subpath.",
  "root_cause_type": "generic",
  "root_cause_zh": "在 use 路径中错误地使用了 `self`；`self` 应该用于引用当前模块，而不是作为子路径。",
  "versions": [
    {
      "version": "1.70",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.75",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.80",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Adding `pub` to the module declaration",
      "why_fails": "Visibility is not the issue; the path syntax is wrong.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "Changing `self` to `super` without understanding the module hierarchy",
      "why_fails": "`super` refers to the parent module, which may not be the intended target.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Remove `self` from the path: use `use crate::module;` instead of `use crate::module::self;`",
      "success_rate": 0.95,
      "how": "Remove `self` from the path: use `use crate::module;` instead of `use crate::module::self;`",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use `use crate::module::{self, OtherItem};` to import the module itself along with other items",
      "success_rate": 0.9,
      "how": "Use `use crate::module::{self, OtherItem};` to import the module itself along with other items",
      "condition": "",
      "sources": []
    },
    {
      "action": "If you meant to import the current module's parent, use `use super::*;`",
      "success_rate": 0.85,
      "how": "If you meant to import the current module's parent, use `use super::*;`",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Remove `self` from the path: use `use crate::module;` instead of `use crate::module::self;`",
    "Use `use crate::module::{self, OtherItem};` to import the module itself along with other items",
    "If you meant to import the current module's parent, use `use super::*;`"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://doc.rust-lang.org/error-index.html#E0432",
  "official_doc_section": null,
  "error_code": "E0432",
  "verification_tier": "ai_generated",
  "confidence": 0.8,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2024-01-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}