File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -440,16 +440,7 @@ macro opt_out(expr)
440440 end
441441end
442442
443- function _no_rule_target_rewrite! (call_target:: Symbol )
444- return if call_target == :rrule
445- :(ChainRulesCore. no_rrule)
446- elseif call_target == :frule
447- :(ChainRulesCore. no_frule)
448- else
449- error (" Unexpected opt-out target. Exprected frule or rrule, got: $call_target " )
450- end
451- end
452- _no_rule_target_rewrite! (qt:: QuoteNode ) = _no_rule_target_rewrite! (qt. value)
443+ " Rewrite method sig Expr for `rrule` to be for `no_rrule`, and `frule` to be `no_frule`."
453444function _no_rule_target_rewrite! (expr:: Expr )
454445 length (expr. args)=== 0 && error (" Malformed method expression. $expr " )
455446 if expr. head === :call || expr. head === :where
@@ -461,6 +452,17 @@ function _no_rule_target_rewrite!(expr::Expr)
461452 end
462453 return expr
463454end
455+ _no_rule_target_rewrite! (qt:: QuoteNode ) = _no_rule_target_rewrite! (qt. value)
456+ function _no_rule_target_rewrite! (call_target:: Symbol )
457+ return if call_target == :rrule
458+ :(ChainRulesCore. no_rrule)
459+ elseif call_target == :frule
460+ :(ChainRulesCore. no_frule)
461+ else
462+ error (" Unexpected opt-out target. Exprected frule or rrule, got: $call_target " )
463+ end
464+ end
465+
464466
465467
466468# ###########################################################################################
You can’t perform that action at this time.
0 commit comments