Skip to content

Commit de21be7

Browse files
authored
Fix obsolete builtins list in devdocs/function (#35271)
Generates the list programmatically now, since we will never remember to update it (though it is perhaps a bit odd that we include this list in the first place, when it is just generated by reflection).
1 parent 177baf8 commit de21be7

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

doc/src/devdocs/functions.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,30 @@ currently share a method table via special arrangement.
101101
102102
The "builtin" functions, defined in the `Core` module, are:
103103
104-
```
105-
=== typeof sizeof <: isa typeassert throw tuple getfield setfield! fieldtype
106-
nfields isdefined arrayref arrayset arraysize applicable invoke apply_type _apply
107-
_expr svec
104+
```@eval
105+
function lines(words)
106+
io = IOBuffer()
107+
n = 0
108+
for w in words
109+
if n+length(w) > 80
110+
print(io, '\n', w)
111+
n = length(w)
112+
elseif n == 0
113+
print(io, w);
114+
n += length(w)
115+
else
116+
print(io, ' ', w);
117+
n += length(w)+1
118+
end
119+
end
120+
String(take!(io))
121+
end
122+
import Markdown
123+
[string(n) for n in names(Core;all=true)
124+
if getfield(Core,n) isa Core.Builtin && nameof(getfield(Core,n)) === n] |>
125+
lines |>
126+
s -> "```\n$s\n```" |>
127+
Markdown.parse
108128
```
109129
110130
These are all singleton objects whose types are subtypes of `Builtin`, which is a subtype of

0 commit comments

Comments
 (0)