)]}'
{
  "commit": "35a82b8ddeb05aa58771f2db087622b4c90a486e",
  "tree": "c0ef51ee43d1d9200269d4e6f419521a4a3f61da",
  "parents": [
    "9f07b2580288272982628ebd3b5ca0d7a4b9038a",
    "78beefed8483cc7b33cf678b6408927dcf5ffb8b"
  ],
  "author": {
    "name": "Stuart Cook",
    "email": "Zalathar@users.noreply.github.com",
    "time": "Fri Nov 14 13:14:04 2025 +1100"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Fri Nov 14 13:14:04 2025 +1100"
  },
  "message": "Rollup merge of #148878 - folkertdev:tail-call-unsupported-abi, r\u003dWaffleLapkin\n\nerror when ABI does not support guaranteed tail calls\n\nSome ABIs cannot support guaranteed tail calls. There isn\u0027t really an exhaustive list, so this is a best effort. Conveniently, we already disallow calling most of these directly anyway. The only exception that I was able to trigger an LLVM assertion with so far was `cmse-nonsecure-entry`.\n\nFor that calling convention, LLVM specifically notes that  (guaranteed) tail calls cannot be supported:\n\nhttps://github.com/llvm/llvm-project/blob/28dbbba6c3a4e026e085c48cc022cb97b5d8bc6d/llvm/lib/Target/ARM/ARMISelLowering.cpp#L2331-L2335\n\n---\n\nI have some doubts about the implementation here though. I think it would be nicer to use `CanonAbi`, and move the `become` ABI check into `rustc_hir_typeck`, similar to `check_call_abi`:\n\nhttps://github.com/rust-lang/rust/blob/d6deffe2debecc66501e50f9573214139ab4d678/compiler/rustc_hir_typeck/src/callee.rs#L157-L194\n\nBoth the check for whether an ABI is callable and whether it supports guaranteed tail calls can then be methods (containing exhaustive matches) on `CanonAbi`. I\u0027m however not sure\n\n- if the ABI checks are deliberately only performed when constructing MIR\n- what assumptions can be made about the `call` expression in [`check_expr_become`](https://github.com/rust-lang/rust/blob/d6deffe2debecc66501e50f9573214139ab4d678/compiler/rustc_hir_typeck/src/expr.rs#L1126-L1150), it looks like currently the check that the \"argument\" to `become` is a function call also only occurs later during MIR construction\n\nAre there issues with validating the ABI earlier in `rustc_hir_typeck` that I\u0027m overlooking? I believe that we should already know the call\u0027s ABI and whether it is c-variadic at that point.\n\ncc ````@workingjubilee```` for `CanonAbi`, ````@davidtwco```` for cmse\nr? ````@WaffleLapkin````\n",
  "tree_diff": []
}
