Rollup merge of #141683 - compiler-errors:unsafe-binder-capture, r=oli-obk
Handle ed2021 precise capturing of unsafe binder Missing pieces from last pr. r? oli-obk Fixes https://github.com/rust-lang/rust/issues/141655
This commit is contained in:
@@ -101,12 +101,12 @@ fn convert_to_hir_projections_and_truncate_for_capture(
|
||||
variant = Some(*idx);
|
||||
continue;
|
||||
}
|
||||
ProjectionElem::UnwrapUnsafeBinder(_) => HirProjectionKind::UnwrapUnsafeBinder,
|
||||
// These do not affect anything, they just make sure we know the right type.
|
||||
ProjectionElem::OpaqueCast(_) | ProjectionElem::Subtype(..) => continue,
|
||||
ProjectionElem::Index(..)
|
||||
| ProjectionElem::ConstantIndex { .. }
|
||||
| ProjectionElem::Subslice { .. }
|
||||
| ProjectionElem::UnwrapUnsafeBinder(_) => {
|
||||
| ProjectionElem::Subslice { .. } => {
|
||||
// We don't capture array-access projections.
|
||||
// We can stop here as arrays are captured completely.
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user