File tree 1 file changed +10
-2
lines changed
pin-project-internal/src/pin_project
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -424,7 +424,11 @@ impl<'a> Context<'a> {
424
424
} ;
425
425
426
426
// Now create guards to drop all the pinned fields
427
- #proj_drop
427
+ //
428
+ // Due to a compiler bug (https://github.com/rust-lang/rust/issues/47949)
429
+ // this must be in its own scope, or else `__result` will not be dropped
430
+ // if any of the destructors panic.
431
+ { #proj_drop }
428
432
429
433
// Finally, return the result
430
434
__result
@@ -555,7 +559,11 @@ impl<'a> Context<'a> {
555
559
} ;
556
560
557
561
// Now create guards to drop all the pinned fields
558
- #proj_drop
562
+ //
563
+ // Due to a compiler bug (https://github.com/rust-lang/rust/issues/47949)
564
+ // this must be in its own scope, or else `__result` will not be dropped
565
+ // if any of the destructors panic.
566
+ { #proj_drop }
559
567
560
568
// Finally, return the result
561
569
__result
You can’t perform that action at this time.
0 commit comments