We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 337b0ea commit 7a40d9cCopy full SHA for 7a40d9c
compiler/parser/python.lalrpop
@@ -439,7 +439,8 @@ TryStatement: ast::Stmt = {
439
.last()
440
.map(|last| last.end_location)
441
.or_else(|| orelse.last().map(|last| last.end_location))
442
- .unwrap_or_else(|| handlers.last().unwrap().end_location);
+ .or_else(|| handlers.last().map(|last| last.end_location))
443
+ .unwrap();
444
ast::Stmt {
445
custom: (),
446
location,
0 commit comments