File tree 1 file changed +4
-4
lines changed
compiler/rustc_codegen_llvm/src/debuginfo
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1314,9 +1314,9 @@ struct TupleMemberDescriptionFactory<'tcx> {
1314
1314
1315
1315
impl < ' tcx > TupleMemberDescriptionFactory < ' tcx > {
1316
1316
fn create_member_descriptions ( & self , cx : & CodegenCx < ' ll , ' tcx > ) -> Vec < MemberDescription < ' ll > > {
1317
- let capture_names = match * self . ty . kind ( ) {
1317
+ let mut capture_names = match * self . ty . kind ( ) {
1318
1318
ty:: Generator ( def_id, ..) | ty:: Closure ( def_id, ..) => {
1319
- Some ( closure_saved_names_of_captured_variables ( cx. tcx , def_id) )
1319
+ Some ( closure_saved_names_of_captured_variables ( cx. tcx , def_id) . into_iter ( ) )
1320
1320
}
1321
1321
_ => None ,
1322
1322
} ;
@@ -1326,8 +1326,8 @@ impl<'tcx> TupleMemberDescriptionFactory<'tcx> {
1326
1326
. enumerate ( )
1327
1327
. map ( |( i, & component_type) | {
1328
1328
let ( size, align) = cx. size_and_align_of ( component_type) ;
1329
- let name = if let Some ( names) = capture_names. as_ref ( ) {
1330
- names[ i ] . clone ( )
1329
+ let name = if let Some ( names) = capture_names. as_mut ( ) {
1330
+ names. next ( ) . unwrap ( )
1331
1331
} else {
1332
1332
format ! ( "__{}" , i)
1333
1333
} ;
You can’t perform that action at this time.
0 commit comments