diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2025-08-21 01:12:14 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-21 01:12:14 -0400 |
| commit | f1a7294e09323afc5f78055225fab2daf652b36f (patch) | |
| tree | f49aa08cecd201a870fc6320159db0bbad561d7d /compiler/rustc_codegen_llvm/src/debuginfo/utils.rs | |
| parent | 32824b58e46ab5a851813c9838de808a59e93189 (diff) | |
| parent | 6a088fd5847b1b24733011fcaab87dfc49853eec (diff) | |
| download | rust-f1a7294e09323afc5f78055225fab2daf652b36f.tar.gz rust-f1a7294e09323afc5f78055225fab2daf652b36f.zip | |
Rollup merge of #144915 - compiler-errors:tail-call-ret-ty-equality, r=WaffleLapkin,lcnr
Defer tail call ret ty equality to check_tail_calls Fixes rust-lang/rust#144892. Currently the tail call signature check assumes that return types have been accounted for. However, this is not complete for several reasons. Firstly, we were using subtyping instead of equality in the HIR typeck code: https://github.com/rust-lang/rust/blob/e1b9081e699065badfc1a9419ec9566e5c8615c4/compiler/rustc_hir_typeck/src/expr.rs#L1096 We could fix this, but it doesn't really do much for us anyways since HIR typeck doesn't care about regions. That means, secondly, we'd need to fix the terminator type check in MIR typeck to account for variances, since tail call terminators need to relate their arguments invariantly to account for the "signature must be equal" rule. This seems annoying. All of this seems like a lot of work, and we already are *manually* checking argument equality. Let's just extend the `check_tail_calls` to account for mismatches in return types anyways. r? ``````@WaffleLapkin``````
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/debuginfo/utils.rs')
0 files changed, 0 insertions, 0 deletions
