Handle restricting closure origin
This commit is contained in:
parent
b86c5db96e
commit
e39c3c05a4
3 changed files with 40 additions and 4 deletions
|
@ -206,11 +206,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
// If we have an origin, store it.
|
||||
if let Some(origin) = delegate.current_origin.clone() {
|
||||
let origin = if self.tcx.features().capture_disjoint_fields {
|
||||
origin
|
||||
(origin.0, restrict_capture_precision(origin.1))
|
||||
} else {
|
||||
// FIXME(project-rfc-2229#31): Once the changes to support reborrowing are
|
||||
// made, make sure we are selecting and restricting
|
||||
// the origin correctly.
|
||||
(origin.0, Place { projections: vec![], ..origin.1 })
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue