]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #87676 - sexxi-goose:truncate_unique, r=nikomatsakis
authorbors <bors@rust-lang.org>
Mon, 23 Aug 2021 17:27:23 +0000 (17:27 +0000)
committerbors <bors@rust-lang.org>
Mon, 23 Aug 2021 17:27:23 +0000 (17:27 +0000)
2229: Handle MutBorrow/UniqueImmBorrow better

We only want to use UniqueImmBorrow when the capture place is truncated and we
drop Deref of a MutRef.

r? `@nikomatsakis`

Fixes: https://github.com/rust-lang/project-rfc-2229/issues/56
1  2 
compiler/rustc_typeck/src/check/upvar.rs