From e59a11fdea2397d6471d3a8f882e94ea7fcdd7d5 Mon Sep 17 00:00:00 2001 From: Agus Zubiaga Date: Mon, 14 Oct 2024 21:45:01 -0300 Subject: [PATCH] Add TODO to remove TryTarget::Task --- crates/compiler/can/src/desugar.rs | 1 - crates/compiler/parse/src/ast.rs | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/crates/compiler/can/src/desugar.rs b/crates/compiler/can/src/desugar.rs index 27a0da0e47..ee6cf636b4 100644 --- a/crates/compiler/can/src/desugar.rs +++ b/crates/compiler/can/src/desugar.rs @@ -362,7 +362,6 @@ pub fn desugar_expr<'a>( | Crash => loc_expr, Var { module_name, ident } => { - // TODO remove when purity inference fully replaces Task // [purity-inference] TODO: only in Task mode if ident.ends_with('!') { env.arena.alloc(Loc::at( diff --git a/crates/compiler/parse/src/ast.rs b/crates/compiler/parse/src/ast.rs index a2e2aebdf0..a51d5ece8e 100644 --- a/crates/compiler/parse/src/ast.rs +++ b/crates/compiler/parse/src/ast.rs @@ -393,6 +393,7 @@ pub enum StrLiteral<'a> { /// Values that can be tried, extracting success values or "returning early" on failure #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum TryTarget { + // TODO: Remove when purity inference replaces Task fully /// Tasks suffixed with ! are `Task.await`ed Task, /// Results suffixed with ? are `Result.try`ed @@ -583,10 +584,7 @@ pub fn is_expr_suffixed(expr: &Expr) -> bool { Expr::Var { module_name: _, ident, - } => { - // TODO remove when purity inference fully replaces Task - ident.ends_with('!') - } + } => ident.ends_with('!'), Expr::TrySuffix { .. } => true,