rust-lang / rust-lang/rustc_public
Annotate SMIR with lifetime information
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
The rust compiler intentionally hides all lifetime information to avoid introducing accidental dependencies on it during compilation and to improve the effectiveness of caching throughout the compiler. Tools like Prusti, Verus or Gillian-Rust on the other hand depend on having access to precise information about the borrows and lifetimes available in a given function.
Currently, a compromise solution has been reached with the compiler giving partial visibility into some of the information calculated by borrowck, allowing tool authors to mostly achieve their goals, though often with significant work on their end.
If SMIR included lifetime information, this would be a killer feature, providing something of huge value to external users while also allowing rustc keep its borrowck implementation private.
Specifically, I would like borrows to be annotated with their regions, and for those regions to have been unified throughout the MIR body. It should also be easy to regions are universal, and to answer outlives questions between regions.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue does not name files, tests, or entry points. Start by reviewing SMIR's current visibility into borrowck information and the requirements for annotating borrows with unified regions, identifying universal regions, and answering outlives questions. Done means SMIR exposes this lifetime information without exposing rustc's borrowck implementation.
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
- Mostly clear
- Newbie friendliness
- 30/100