)]}'
{
  "commit": "5ce2dfd01b3e97d0ce245bb0fd1a272af10041c2",
  "tree": "db937f762d51cd9fb01a52ed378e9d03f0dd630d",
  "parents": [
    "2fde0a15d59aea01c45ec483e4c81ac31f63d231",
    "1b46aa0fdb1e825363174ce509e40466cc0af416"
  ],
  "author": {
    "name": "Jonathan Brouwer",
    "email": "jonathantbrouwer@gmail.com",
    "time": "Tue Jan 27 17:00:54 2026 +0100"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Jan 27 17:00:54 2026 +0100"
  },
  "message": "Rollup merge of #150557 - dianne:no-const-block-eval-in-promotion, r\u003dlcnr\n\nDon\u0027t try to evaluate const blocks during constant promotion\n\nAs of https://github.com/rust-lang/rust/pull/138499, trying to evaluate a const block in anything depended on by borrow-checking will result in a query cycle. Since that could happen in constant promotion, this PR adds a check for const blocks there to stop them from being evaluated.\n\nAdmittedly, this is a hack. See https://github.com/rust-lang/rust/issues/124328 for discussion of a more principled fix: removing cases like this from constant promotion altogether. To simplify the conditions under which promotion can occur, we probably shouldn\u0027t be implicitly promoting division or array indexing at all if possible. That would likely require a FCW and migration period, so I figure we may as well patch up the cycle now and simplify later.\n\nFixes rust-lang/rust#150464\n\nI\u0027ll also lang-nominate this for visibility. I\u0027m not sure there\u0027s much to discuss about this PR specifically, but it does represent a change in semantics. In Rust 1.87, the code below compiled. In Rust 1.88, it became a query cycle error. After this PR, it fails to borrow-check because the temporaries can no longer be promoted.\n\n```rust\nlet (x, y, z);\n// We only promote array indexing if the index is known to be in-bounds.\nx \u003d \u0026([0][const { 0 }] \u0026 0);\n// We only promote integer division if the divisor is known not to be zero.\ny \u003d \u0026(1 / const { 1 });\n// Furthermore, if the divisor is `-1`, we only promote if the dividend is\n// known not to be `int::MIN`.\nz \u003d \u0026(const { 1 } / -1);\n// The borrowed temporaries can\u0027t be promoted, so they were dropped at the ends\n// of their respective statements.\n(x, y, z);\n```\n",
  "tree_diff": []
}
