]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #49822 - matthewjasper:dropck-closures, r=nikomatsakis
authorbors <bors@rust-lang.org>
Fri, 27 Apr 2018 23:31:43 +0000 (23:31 +0000)
committerbors <bors@rust-lang.org>
Fri, 27 Apr 2018 23:31:43 +0000 (23:31 +0000)
Access individual fields of tuples, closures and generators on drop.

Fixes #48623, by extending the change in #47917 to closures. Also does this for tuples and generators for consistency.

Enums are unchanged because there is now way to borrow `*enum.field` without borrowing `enum.field` at the moment, so any error would be reported when the enum goes out of scope. Unions aren't changed because unions they don't automatically drop their fields.

r? @nikomatsakis


Trivial merge