Closed
Description
This issue tracks experimental work, overseen by the lang team, on several interrelated topics:
- Improving the ergonomics around
Copy
types and references (i.e. "imagine never having to write&0
orlet z = &u * &(&(&u.square() + &(&A * &u)) + &one);
again) - Improving the consistency of method dispatch for operators with standard dispatch.
- Improving the ergonomics around using owned values where references are expected.
- Improving the interaction between generics and coercions.
- Improving the interaction between function-passing code and coercions.
- Helping to avoid accidental copies of large
Copy
types. - Potentially a very limited form of auto-
Clone
.
None of these bullet items should be taken as signifying a decision, but rather a desire to experiment in a particularly tricky design space.
Ongoing experiments
- RFC: Allow autoderef and autoref in operators
- Rust tracking issue is Tracking issue: Allow autoderef and autoref in operators (experiment) #44762.
- RFC: Autoreferencing
Copy
Types- Rust tracking issue is Autoreferencing copy types #44763.
- Lint warning against undesirable copies.
- Rust tracking issue is Lint for undesirable, implicit copies #45683.
Relevant previous discussions
This tracking issue is a good place to continue discussion, at least initially; we may ultimately want to break out threads on internals to help hash out preliminary design thoughts.
After an experimental period, the expectation is that whatever designs are deemed sufficiently plausible are turned into fresh RFCs, and then go through the standard process.