@@ -254,11 +254,10 @@ propagator_name(fname::QuoteNode, propname::Symbol) = propagator_name(fname.valu
254254 @non_differentiable(signature_expression)
255255
256256A helper to make it easier to declare that a method is not not differentiable.
257- This is a short-hand for defining a [`frule`](@ref) and an [`rrule`](@ref)+ pullback that
258- returns [`DoesNotExist()`](@ref) for all partials (except for the function `s̄elf`-partial
257+ This is a short-hand for defining an [`frule`](@ref) and [`rrule`](@ref) that
258+ return [`DoesNotExist()`](@ref) for all partials (except for the function `s̄elf`-partial
259259itself which is `NO_FIELDS`)
260260
261- The usage is to put the macro before a function signature.
262261Keyword arguments should not be included.
263262
264263```jldoctest
@@ -309,7 +308,7 @@ function _nondiff_frule_expr(primal_sig_parts, primal_invoke)
309308 :(= ),
310309 Expr (:call , :(ChainRulesCore. frule), esc (:_ ), esc .(primal_sig_parts)... ),
311310 # Julia functions always only have 1 output, so just return a single DoesNotExist()
312- Expr (:tuple , primal_invoke, DoesNotExist ())
311+ Expr (:tuple , primal_invoke, DoesNotExist ()),
313312 )
314313end
315314
@@ -379,14 +378,14 @@ end
379378" turn both `a` and `a::S` into `a`"
380379_unconstrain (arg:: Symbol ) = arg
381380function _unconstrain (arg:: Expr )
382- Meta. isexpr (arg, :(:: ), 2 ) && return arg. args[1 ] # dop constraint.
381+ Meta. isexpr (arg, :(:: ), 2 ) && return arg. args[1 ] # drop constraint.
383382 error (" malformed arguments: $arg " )
384383end
385384
386- " turn both `a` and `::Number ` into `a::Number` into `a::Number ` etc"
387- function _constrain_and_name (arg:: Expr , default_constraint )
385+ " turn both `a` and `::constraint ` into `a::constraint ` etc"
386+ function _constrain_and_name (arg:: Expr , _ )
388387 Meta. isexpr (arg, :(:: ), 2 ) && return arg # it is already fine.
389388 Meta. isexpr (arg, :(:: ), 1 ) && return Expr (:(:: ), gensym (), arg. args[1 ]) # add name
390389 error (" malformed arguments: $arg " )
391390end
392- _constrain_and_name (name:: Symbol , constraint) = Expr (:(:: ), name, constraint) # add type
391+ _constrain_and_name (name:: Symbol , constraint) = Expr (:(:: ), name, constraint) # add type
0 commit comments