)]}'
{
  "commit": "13539e1ce0210afa4a6f220ff4f959c2be6cd724",
  "tree": "5c1091c9afa5f1f182fafe20b14ceca133d3c931",
  "parents": [
    "cdab17b9fc0b312e2a32c351fbe3cd938557a44a"
  ],
  "author": {
    "name": "Wilfred Hughes",
    "email": "wilfred@meta.com",
    "time": "Thu Jun 25 18:19:36 2026 +0100"
  },
  "committer": {
    "name": "Wilfred Hughes",
    "email": "wilfred@meta.com",
    "time": "Fri Jun 26 10:32:36 2026 +0100"
  },
  "message": "fix: Crash when hovering on anonymous consts\n\nPreviously, the following code would cause rust-analyzer to infinitely\nrecurse when hovering on `x`.\n\n    trait Tr\u003cconst N: usize\u003e {}\n    pub fn f(x: impl Tr\u003c{ 0 }\u003e) {}\n\nAttaching gdb and printing a stack trace shows that the problem is in\nHirDisplay for an anonymous const.\n\n    frame 9  hir_ty::display::hir_fmt_generic_arguments () at crates/hir-ty/src/display.rs:1920\n    frame 10 0x00005555563b9f94 in hir_ty::display::hir_fmt_generics () at crates/hir-ty/src/display.rs:1843\n    frame 11 0x00005555563bd0ea in \u003chir_ty::next_solver::consts::Const as hir_ty::display::HirDisplay\u003e::hir_fmt () at crates/hir-ty/src/display.rs:768\n    frame 12 0x00005555563ba964 in \u003chir_ty::next_solver::generic_arg::GenericArg as hir_ty::display::HirDisplay\u003e::hir_fmt () at crates/hir-ty/src/display.rs:716\n    frame 13 hir_ty::display::hir_fmt_generic_arguments () at crates/hir-ty/src/display.rs:1920\n\nInstead, just render anonymous consts as `{const}` rather than trying\nto render the synthetic type parameters too.\n\n(We could track cycles like we do for recursive bounds, but that just\nproduces a hover of `x: impl Tr\u003c{const}\u003cimpl …\u003e\u003e + ?Sized` which\ndoesn\u0027t seem terribly useful.)\n\nAI disclosure: Initial implementation done with Codex and GPT-5.5.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ab290aa57a7bc4a370d142cc04d46a7e391719ca",
      "old_mode": 33188,
      "old_path": "crates/hir-ty/src/display.rs",
      "new_id": "5d0a010a7fe39bc50cd03fd8b3a42dc2c219a2e3",
      "new_mode": 33188,
      "new_path": "crates/hir-ty/src/display.rs"
    },
    {
      "type": "modify",
      "old_id": "30644fe2db8982b4ce8e37853d2f82f5743829f6",
      "old_mode": 33188,
      "old_path": "crates/ide/src/hover/tests.rs",
      "new_id": "2bd79d79dfb13bec707a9c5dfa7faac6ad85631b",
      "new_mode": 33188,
      "new_path": "crates/ide/src/hover/tests.rs"
    }
  ]
}
