Skip to content

Commit ed2de3c

Browse files
authored
remove unused temporary variables in code_warntype (#23735)
* remove unused temporary variables in code_warntype * ws
1 parent 673fcb1 commit ed2de3c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

base/interactiveutil.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,15 +374,15 @@ function code_warntype(io::IO, f, @nospecialize(t))
374374
slotnames = sourceinfo_slotnames(src)
375375
used_slotids = slots_used(src, slotnames)
376376
for i = 1:length(slotnames)
377-
print(emph_io, " ", slotnames[i])
378377
if used_slotids[i]
378+
print(emph_io, " ", slotnames[i])
379379
if isa(src.slottypes, Array)
380380
show_expr_type(emph_io, src.slottypes[i], true)
381381
end
382-
else
383-
print(emph_io, " <optimized out>")
382+
print(emph_io, '\n')
383+
elseif !('#' in slotnames[i] || '@' in slotnames[i])
384+
print(emph_io, " ", slotnames[i], "<optimized out>\n")
384385
end
385-
print(emph_io, '\n')
386386
end
387387
print(emph_io, "\nBody:\n ")
388388
body = Expr(:body)

0 commit comments

Comments
 (0)