Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify lightweight clones, including into closures and async blocks #3680

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Changes from 35 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
cbc1941
Simplify lightweight clones, including closures and async blocks
joshtriplett Jul 28, 2024
396cc14
Add RFC number for cross-reference to RFC 3678
joshtriplett Aug 20, 2024
07679f1
Clarify wording
joshtriplett Aug 20, 2024
f3b9668
Add future possibility of `Use` on small arrays
joshtriplett Aug 20, 2024
8ad5862
Expand on evaluation of use cases in future work
joshtriplett Aug 20, 2024
6fa409a
Record `ToOwned` possibility as an unresolved question
joshtriplett Aug 20, 2024
fd42e86
Suggest a lint for expensive `Use` implementations
joshtriplett Aug 20, 2024
64ed357
RFC 3680
joshtriplett Aug 20, 2024
7146131
Add RFC number to RFC PR link
joshtriplett Aug 20, 2024
5b85390
Add alternative for calling `Clone::clone` directly
joshtriplett Aug 20, 2024
5bae2bf
Use `Clone::clone` directly; eliminate `Use::do_use`
joshtriplett Aug 20, 2024
969836b
Add an alternative for general `Clone::clone` elision
joshtriplett Aug 20, 2024
823d892
Add alternative/rationale explaining why automatic clone doesn't suffice
joshtriplett Aug 20, 2024
7d41d87
Add the possibility of using a method while still having elision
joshtriplett Aug 20, 2024
de930d8
Alternative: constrain the elision rules and disallow future optimiza…
joshtriplett Aug 20, 2024
da366a0
Fix typo (missing backquote)
joshtriplett Aug 20, 2024
7f2da74
Remove fallback to borrowing, and add an unresolved question
joshtriplett Aug 20, 2024
4cc8920
Add alternative for adding this to bindings rather than types
joshtriplett Aug 20, 2024
dc8745b
Add possibility of direct `Copy` (per nikomatsakis)
joshtriplett Aug 21, 2024
122cf55
Add possibility of closures/blocks moving things if dead
joshtriplett Aug 21, 2024
ab000b9
Rework motivation to make the RFC more neutral towards future RFCs
joshtriplett Aug 21, 2024
7825d31
Future possibility: lints to help catch large array copies
joshtriplett Aug 21, 2024
3ef0e56
Add more general explorations of Copy/Use
joshtriplett Aug 21, 2024
ca82408
Aligns with other proposals for precise capture syntax
joshtriplett Aug 21, 2024
10671f4
Closures/blocks move if statically dead
joshtriplett Aug 21, 2024
80745d6
Clarify "statically dead" to "statically dead after the closure/block"
joshtriplett Aug 21, 2024
de7d33b
Superseding `move` closures?
joshtriplett Aug 21, 2024
a130f07
Unresolved question: `#[marker]` trait?
joshtriplett Aug 21, 2024
1fc1d6a
Add alternative of floating `x.use` out of closures
joshtriplett Aug 21, 2024
b7b8474
Unresolved questions: remove a resolved question
joshtriplett Aug 21, 2024
84a5614
Add unresolved question for clone elision
joshtriplett Aug 21, 2024
16d8f54
Expand mention of `Copy` handling in alternatives
joshtriplett Aug 21, 2024
d9faf4c
Clarify an elision case
joshtriplett Aug 21, 2024
856093b
We may want a derive(Use)
joshtriplett Aug 21, 2024
9d5166d
Future work: Smarter suggestions for missing bounds
joshtriplett Aug 21, 2024
041a840
Mention alternate keywords
joshtriplett Aug 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading