-
Notifications
You must be signed in to change notification settings - Fork 48
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
RFC 2229 #50
Comments
There are some more relaxations to closures that can be made as side effects of work being done for 2229, proposed details can be found here: rust-lang/project-rfc-2229#16 |
Update 2020-10-26: Uncovered a few interesting things this far. For example, this changes behavior: let c = || {
let _ = x; // today: borrows `x`
}; In the new edition, using the new RFC, |
|
The workgroup's focus over the last month has been diagnostics, migrations and getting closer to the edition 21 release. 1. Diangostics
let mut p = Point { x: 1, y: 2 };
let y = &p.y;
let mut c = || {
println!("{:?}", p);
let x = &mut p.x;
};
c();
println!("{}", y); Output ater change (available on rust nightly): 2. Migrations
3. Closure Size
Cargo and all depensices size data: https://docs.google.com/spreadsheets/d/1Irsj5O7HPPfomWat2jPTPdx_KPlsyYo5kRuQpNNuwsQ/edit?usp=sharing |
|
Stabilized! |
Summary
RFC 2229 modifies closures so that they do not capture entire variables but instead more precise paths.
Info
#t-compiler/wg-rfc-2229
What is this issue?
This issue represents an active project group. It is meant to be used for
the group to post updates to the lang team (and others) in a lightweight
fashion. Please do not use the comments here for discussion, that should be kept
in the Zulip stream (discussion comments here will be marked as off-topic).
The text was updated successfully, but these errors were encountered: