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)
440
440
end
441
441
end
442
442
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`."
453
444
function _no_rule_target_rewrite! (expr:: Expr )
454
445
length (expr. args)=== 0 && error (" Malformed method expression. $expr " )
455
446
if expr. head === :call || expr. head === :where
@@ -461,6 +452,17 @@ function _no_rule_target_rewrite!(expr::Expr)
461
452
end
462
453
return expr
463
454
end
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
+
464
466
465
467
466
468
# ###########################################################################################
You can’t perform that action at this time.
0 commit comments