rust-lang / rust-lang/rfcs

Improve cross-borrowing ergonomics

Open
#368 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Many Rust users say that the ergonomics for borrowing / deref / reborrowing is poor, especially compared to how magically dot (a.f) will behave (with respect to how it auto-derefs and borrows a).

This issue is meant to act as a place to collect the various proposals that have been put forward to resolve this. I guess it might be thought of as a meta-issue, except that I think it will mostly be collecting references to RFC PR's, rather than other issues.

(My current plan is to try to put links to all the appropriate PR's into this description itself; people can feel free to refer back to this issue, but I'm not planning on annotating each PR with a link, especially since the list of references inserted by github can get somewhat polluted... I will also try to link to meeting minutes if I can find them.)

Proposals:

  • #226
  • #241
  • #248

Relevant rust-lang/rust issues:

  • rust-lang/rust/issues/13988

Relevant Meeting Snippets

Potentially relevant discuss links (pre-RFCs, etc):

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 with the proposals listed in this issue (#226, #241, and #248), then review the linked Rust issue and meeting snippets about cross-borrowing and autoderef. The issue is a collection point rather than a defined implementation task; completion would require an agreed proposal and clear scope.

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.