From acb679eb492fb0d9d7b3d5d5cd63258a163b7f37 Mon Sep 17 00:00:00 2001 From: odow Date: Fri, 1 Sep 2023 12:24:58 +1200 Subject: [PATCH] Clarify docstring of rewrite macro --- src/rewrite.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/rewrite.jl b/src/rewrite.jl index d69339da..56b6a870 100644 --- a/src/rewrite.jl +++ b/src/rewrite.jl @@ -5,7 +5,7 @@ # one at http://mozilla.org/MPL/2.0/. """ - @rewrite(expr; move_factors_into_sums = false) + @rewrite(expr, move_factors_into_sums = false) Return the value of `expr`, exploiting the mutability of the temporary expressions created for the computation of the result. @@ -13,6 +13,10 @@ expressions created for the computation of the result. If you have an `Expr` as input, use [`rewrite_and_return`](@ref) instead. See [`rewrite`](@ref) for an explanation of the keyword argument. + +!!! info + Passing `move_factors_into_sums` after a `;` is not supported. Use a `,` + instead. """ macro rewrite(args...) @assert 1 <= length(args) <= 2