Rollup merge of #84358 - sexxi-goose:print_captures_borrowck_rebased, r=nikomatsakis
Update closure capture error logging for disjoint captures for disjoint captures Improved error logging when `#![feature(capture_disjoint_fields)]` is used. Closes https://github.com/rust-lang/project-rfc-2229/issues/8 Closes https://github.com/rust-lang/project-rfc-2229/issues/36 Closes https://github.com/rust-lang/project-rfc-2229/issues/39 Closes #76005
This commit is contained in:
commit
a00edce017
57 changed files with 535 additions and 153 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