)]}'
{
  "commit": "17c25e44832cb553690df8991156dbbf8a0243b4",
  "tree": "3c3b3c0de44157f1139bf5c065378b234bfe9374",
  "parents": [
    "1f2d7db11215fcbf34f82a2a5f910e09edf1176f",
    "dae003b04b2c2be12a690bc5c82b097b696ea18b"
  ],
  "author": {
    "name": "Stuart Cook",
    "email": "Zalathar@users.noreply.github.com",
    "time": "Thu Nov 13 11:57:10 2025 +1100"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Nov 13 11:57:10 2025 +1100"
  },
  "message": "Rollup merge of #148872 - ShoyuVanilla:issue-148192, r\u003dchenyukang\n\nfix: Do not ICE when missing match arm with ill-formed subty is met\n\nFixes rust-lang/rust#148192\n\nThe ICE comes from the following line, calling `normalize_erasing_regions` to a projection type whose trait bound is not met:\nhttps://github.com/rust-lang/rust/blob/2fcbda6c1a70606bdb09857e01d01fc6229da712/compiler/rustc_pattern_analysis/src/rustc.rs#L185-L194\n\nThe above function is called while trying to lint missing match arms, or scrutinize ctors of missing(not necessary error) match arms.\n\nSo, the following code can trigger ICEs.\n```rust\ntrait WhereTrait {\n    type Type;\n}\n\nfn foo(e: Enum) {\n    match e {\n        Enum::Map(_) \u003d\u003e (), // ICE, while trying to lint missing arms\n    }\n\n    if let Enum::Map(_) \u003d e {} // ICE, while trying to scrutinize missing ctors (even worse)\n}\n\nenum Enum {\n    Map(()),\n    Map2(\u003c() as WhereTrait\u003e::Type),\n}\n```\n\nThis ICE won\u0027t be triggered with the following code, as this is filtered out before `check_match` as the existence of ill-formed type inside the variant marks the body as tainted by error in `hir_typeck`, but for the above code, the `hir_typeck` complains nothing because everything it sees is locally correct.\n\n```rust\nfn foo(e: Enum) {\n    match e {\n        Enum::Map2(_) \u003d\u003e (), // No ICE\n    }\n}\n```\n\nI\u0027ve considered visiting and wf checking for the match scrutinee before entering `check_match`, but that might regress the perf and I think just emitting delayed bug would enough as the normalization failure would be originated by other errors like ill-formdness.\n",
  "tree_diff": []
}
