Open
Description
Metadata | |
---|---|
Point of contact | @spastorino |
Team(s) | lang |
Goal document | 2025h1/ergonomic-rc |
Summary
- Deliver a nightly implementation of the experimental
use
syntax for ergonomic ref-counting. - RFC decision on the above
Tasks and status
- Implementation (@spastorino)
- Reviews (@nikomatsakis)
- Lang-team champion (lang
)
- Author RFC (@joshtriplett)
- Introduce
x.use
anduse ||
syntax andUseCloned
trait (Ergonomic ref counting rust#134797). - Modify codegen so that we guarantee that
x.use
will do a copy ifX: Copy
is true after monomorphization. Right now the desugaring toclone
occurs before monomorphization and hence it will call theclone
method even for those instances whereX
is aCopy
type. - Convert
x.use
to a move rather than a clone if this is a last-use. - Make
x
equivalent tox.use
but with an (allow-by-default) lint to signal that something special is happened.
Metadata
Metadata
Assignees
Type
Projects
Status
Project goal