Desugar stmt expr before checking whether it's suffixed

This commit is contained in:
Agus Zubiaga 2024-10-14 23:01:26 -03:00
parent 01c94050c8
commit 460fa693fd
No known key found for this signature in database
3 changed files with 12 additions and 6 deletions

View file

@ -592,10 +592,7 @@ pub fn is_top_level_suffixed(expr: &Expr) -> bool {
pub fn is_expr_suffixed(expr: &Expr) -> bool {
match expr {
// expression without arguments, `read!`
Expr::Var {
module_name: _,
ident,
} => ident.ends_with('!'),
Expr::Var { .. } => false,
Expr::TrySuffix { .. } => true,