]> git.lizzy.rs Git - rust.git/commit
Auto merge of #86445 - sexxi-goose:box_fix, r=nikomatsakis
authorbors <bors@rust-lang.org>
Sun, 27 Jun 2021 18:10:35 +0000 (18:10 +0000)
committerbors <bors@rust-lang.org>
Sun, 27 Jun 2021 18:10:35 +0000 (18:10 +0000)
commita4f832b2755fa1421edd3bf6d8b4d61f2c1732b6
tree3a57797f7696d89939a42085cc2836aa3ba6447f
parent9cdb2d3d59bad2843330535a41d0ebbb831fe57e
parentd37a07ffbefd6772a68c25f18d35a7fe5b82942e
Auto merge of #86445 - sexxi-goose:box_fix, r=nikomatsakis

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.

Closes https://github.com/rust-lang/project-rfc-2229/issues/50

r? `@nikomatsakis`