Add safety comment

This commit is contained in:
Micha Reiser
2023-05-31 09:37:48 +02:00
parent 4a2c4aad0b
commit 342cd19f50
2 changed files with 3 additions and 1 deletions

View File

@@ -388,6 +388,7 @@ MatchStatement: ast::Stmt = {
MatchCase: ast::MatchCase = {
<start:@L> "case" <pattern:Patterns> <guard:(Guard)?> ":" <body:Suite> => {
// SAFETY: `body` is never empty because it is non-optional and `Suite` matches one or more statements.
let end = body.last().unwrap().end();
ast::MatchCase {
pattern,