Skip to content

Commit d675be3

Browse files
authored
Merge pull request #323 from devmotion/dw/remove_linenums
Use `Base.remove_linenums!` to obtain cleaner macro output
2 parents 7e41fc7 + 643e140 commit d675be3

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ChainRulesCore"
22
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
3-
version = "0.9.33"
3+
version = "0.9.34"
44

55
[deps]
66
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"

src/rule_definition_tools.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
using Base.Meta
33

44
macro strip_linenos(expr)
5-
strip_linenos(x::LineNumberNode) = nothing
6-
strip_linenos(x::Expr) = Expr(x.head, map(strip_linenos, x.args)...)
7-
strip_linenos(x) = x
8-
return esc(strip_linenos(expr))
5+
return esc(Base.remove_linenums!(expr))
96
end
107

118
"""

0 commit comments

Comments
 (0)