rust-lang / rust-lang/rfcs

Owned references to contents in an earlier stack frame (`&own`, `&move`, etc)

Open
#998 11 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

T-lang
Dominant language
Markdown
Stars
6.6k
Forks
1.7k
Avg merge
16h 14m
Merged PRs (30d)
1

Description

A common request is to have a way to pass a reference that actually owns its referent. The idea originated long ago in an attempt to find a suitable type for Drop, but it's not a perfect fit there (you really want to not own the struct being dropped, just its fields). It has since resurfaced as a means to pass ownership of unsized types (but see https://github.com/rust-lang/rfcs/issues/990 as well) and various other use cases.

Postponed RFCs

Contributor guide

No contributing guide indexed for this repository

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 reading the issue's discussion and the postponed RFCs 965 and 1617, then review the related RFC issue 990. The work would need a settled design for owned references such as &own and &move, along with agreement on the relevant use cases before implementation could begin.

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
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.