From db9c00ec1ec48e8adfed756fbbaf7ed37134d7ab Mon Sep 17 00:00:00 2001 From: Lunarmagpie Date: Thu, 22 Dec 2022 21:00:58 -0500 Subject: [PATCH] update docs to better explain -> operator --- crates/reporting/tests/test_reporting.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/reporting/tests/test_reporting.rs b/crates/reporting/tests/test_reporting.rs index da3db9af29..de74eaf394 100644 --- a/crates/reporting/tests/test_reporting.rs +++ b/crates/reporting/tests/test_reporting.rs @@ -5645,11 +5645,16 @@ All branches in an `if` must have the same type! 5│ 1 -> True ^^ - The arrow -> is only used to define cases in a `when`. + The arrow -> is used to define cases in a `when` expression: when color is Red -> "stop!" Green -> "go!" + + And defining functions: + + increment = \n -> n + 1 + "### );