rust/compiler/rustc_typeck
Aman Arora de2052af9c 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.
2021-06-24 19:39:51 -04:00
..

For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.