You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 5, 2024. It is now read-only.
#![feature(capture_disjoint_fields)]#![feature(rustc_attrs)]structS(i32,String);fnmain(){let x = Box::new(S(0,String::new()));let c = move || {println!("{}, x.1);// currently capture x.1 by Move};}
This should capture x by move.
The text was updated successfully, but these errors were encountered:
2229: Capture box completely in move closures
Even if the content from box is used in a sharef-ref context,
we capture the box entirerly.
This is motivated by:
1) We only capture data that is on the stack.
2) Capturing data from within the box might end up moving more data than
the user anticipated.
Closesrust-lang/project-rfc-2229#50
r? `@nikomatsakis`
This should capture
x
by move.The text was updated successfully, but these errors were encountered: