Make Pat::Range's start and end Option<ExprId>

This commit is contained in:
Ali Bektas 2025-01-07 22:57:40 +01:00
parent b7b09d2acb
commit 06097c3388
6 changed files with 48 additions and 26 deletions

View file

@ -440,7 +440,9 @@ impl ExprValidator {
return;
};
let root = source_ptr.file_syntax(db.upcast());
let ast::Expr::IfExpr(if_expr) = source_ptr.value.to_node(&root) else {
let either::Left(ast::Expr::IfExpr(if_expr)) =
source_ptr.value.to_node(&root)
else {
return;
};
let mut top_if_expr = if_expr;