rust-lang / rust-lang/rust

Tail call signature equality check only really needs to be subtyping

Open
#144,953 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

F-explicit_tail_calls T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

We have a check for become f() tail calls which enforces that the callee's signature is compatible with the caller's signature.

Right now that compatibility check enforces equality of arguments, but I think it only should require a subtyping relationship between arguments.

I'm just opening this issue to track this so we don't forget that we should relax this and also reason about why it's sound.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the compiler check for become f() tail calls and reading how it compares the callee and caller signatures. The work is done when argument compatibility uses a subtyping relationship rather than equality and the soundness of that relaxation has been reasoned about.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.