File tree 3 files changed +9
-2
lines changed
rustc_mir_build/src/builder/expr 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,10 @@ impl<'tcx> CapturedPlace<'tcx> {
117
117
}
118
118
} ,
119
119
120
+ HirProjectionKind :: UnwrapUnsafeBinder => {
121
+ write ! ( & mut symbol, "__unwrap" ) . unwrap ( ) ;
122
+ }
123
+
120
124
// Ignore derefs for now, as they are likely caused by
121
125
// autoderefs that don't appear in the original code.
122
126
HirProjectionKind :: Deref => { }
Original file line number Diff line number Diff line change @@ -101,12 +101,12 @@ fn convert_to_hir_projections_and_truncate_for_capture(
101
101
variant = Some ( * idx) ;
102
102
continue ;
103
103
}
104
+ ProjectionElem :: UnwrapUnsafeBinder ( _) => HirProjectionKind :: UnwrapUnsafeBinder ,
104
105
// These do not affect anything, they just make sure we know the right type.
105
106
ProjectionElem :: OpaqueCast ( _) | ProjectionElem :: Subtype ( ..) => continue ,
106
107
ProjectionElem :: Index ( ..)
107
108
| ProjectionElem :: ConstantIndex { .. }
108
- | ProjectionElem :: Subslice { .. }
109
- | ProjectionElem :: UnwrapUnsafeBinder ( _) => {
109
+ | ProjectionElem :: Subslice { .. } => {
110
110
// We don't capture array-access projections.
111
111
// We can stop here as arrays are captured completely.
112
112
break ;
Original file line number Diff line number Diff line change
1
+ //@ revisions: e2015 e2021
2
+ //@[e2015] edition: 2015
3
+ //@[e2021] edition: 2021
1
4
//@ check-pass
2
5
3
6
#![ feature( unsafe_binders) ]
You can’t perform that action at this time.
0 commit comments