Update region when desugaring ! in Task mode

This commit is contained in:
Agus Zubiaga 2024-10-28 09:00:39 -03:00
parent 46e808dc3a
commit a0f4b38ee9
No known key found for this signature in database
23 changed files with 115 additions and 115 deletions

View file

@ -421,7 +421,7 @@ pub fn desugar_expr<'a>(
Var { module_name, ident } => {
if env.fx_mode == FxMode::Task && ident.ends_with('!') {
env.arena.alloc(Loc::at(
loc_expr.region,
Region::new(loc_expr.region.start(), loc_expr.region.end().sub(1)),
TrySuffix {
expr: env.arena.alloc(Var {
module_name,