From b2bf4f7393425778a128fa7f09c0a86e6fb43df2 Mon Sep 17 00:00:00 2001 From: Lyndon White Date: Tue, 20 Jul 2021 18:08:41 +0100 Subject: [PATCH] Update docs/src/opting_out_of_rules.md Co-authored-by: Miha Zgubic --- docs/src/opting_out_of_rules.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/opting_out_of_rules.md b/docs/src/opting_out_of_rules.md index c8fed4a27..9f3bc1732 100644 --- a/docs/src/opting_out_of_rules.md +++ b/docs/src/opting_out_of_rules.md @@ -78,7 +78,7 @@ The Julia compiler will specialize based on inferring the return type of `rrule` The body of this method doesn't matter, what matters is that it is a method-table. A simple thing you can do with this is not support opting out. To do this, filter all methods from the `rrule`/`frule` method table that also occur in the `no_frule`/`no_rrule` table. -This will thus avoid ever hitting an `rrule`/`frule` that returns `nothing` and thus makes your library error. +This will thus avoid ever hitting an `rrule`/`frule` that returns `nothing` (and thus prevents your library from erroring). This is easily done, though it does mean ignoring the user's stated desire to opt out of the rule. More complex you can use this to generate code that triggers your AD.