This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
compiler/rustc_codegen_llvm/src/debuginfo Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1314,9 +1314,9 @@ struct TupleMemberDescriptionFactory<'tcx> {
13141314
13151315impl < ' tcx > TupleMemberDescriptionFactory < ' tcx > {
13161316 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 ( ) {
13181318 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 ( ) )
13201320 }
13211321 _ => None ,
13221322 } ;
@@ -1326,8 +1326,8 @@ impl<'tcx> TupleMemberDescriptionFactory<'tcx> {
13261326 . enumerate ( )
13271327 . map ( |( i, & component_type) | {
13281328 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 ( )
13311331 } else {
13321332 format ! ( "__{}" , i)
13331333 } ;
You can’t perform that action at this time.
0 commit comments