Closure capture borrow diagnostics for disjoint captures
This commit is contained in:
parent
6e2a34474b
commit
08c4fbcea7
56 changed files with 532 additions and 152 deletions
|
@ -763,7 +763,9 @@ impl<'a, 'tcx> ExprUseVisitor<'a, 'tcx> {
|
|||
PlaceBase::Local(*var_hir_id)
|
||||
};
|
||||
let place_with_id = PlaceWithHirId::new(
|
||||
capture_info.path_expr_id.unwrap_or(closure_expr.hir_id),
|
||||
capture_info.path_expr_id.unwrap_or(
|
||||
capture_info.capture_kind_expr_id.unwrap_or(closure_expr.hir_id),
|
||||
),
|
||||
place.base_ty,
|
||||
place_base,
|
||||
place.projections.clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue