Skip to content

Commit f13213d

Browse files
authored
fix some invalidations with ChainRulesCore (#39506)
1 parent 4430ae8 commit f13213d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

base/show.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,7 @@ function show_mi(io::IO, l::Core.MethodInstance, from_stackframe::Bool=false)
10691069
# to print a little more identifying information.
10701070
if !from_stackframe
10711071
linetable = l.uninferred.linetable
1072-
line = isempty(linetable) ? "unknown" : (lt = linetable[1]::Union{LineNumberNode,Core.LineInfoNode}; string(lt.file) * ':' * string(lt.line))
1072+
line = isempty(linetable) ? "unknown" : (lt = linetable[1]::Union{LineNumberNode,Core.LineInfoNode}; string(lt.file, ':', lt.line))
10731073
print(io, " from ", def, " starting at ", line)
10741074
end
10751075
end
@@ -1093,7 +1093,7 @@ function show(io::IO, mi_info::Core.Compiler.Timings.InferenceFrameInfo)
10931093
end
10941094
else
10951095
linetable = mi.uninferred.linetable
1096-
line = isempty(linetable) ? "" : (lt = linetable[1]; string(lt.file) * ':' * string(lt.line))
1096+
line = isempty(linetable) ? "" : (lt = linetable[1]; string(lt.file, ':', lt.line))
10971097
print(io, "Toplevel InferenceFrameInfo thunk from ", def, " starting at ", line)
10981098
end
10991099
end

stdlib/Logging/src/ConsoleLogger.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ end
6060
function default_metafmt(level::LogLevel, _module, group, id, file, line)
6161
@nospecialize
6262
color = default_logcolor(level)
63-
prefix = (level == Warn ? "Warning" : string(level))*':'
64-
suffix = ""
63+
prefix = string(level == Warn ? "Warning" : string(level), ':')
64+
suffix::String = ""
6565
Info <= level < Warn && return color, prefix, suffix
6666
_module !== nothing && (suffix *= "$(_module)")
6767
if file !== nothing
6868
_module !== nothing && (suffix *= " ")
69-
suffix *= Base.contractuser(file)
69+
suffix *= Base.contractuser(file)::String
7070
if line !== nothing
7171
suffix *= ":$(isa(line, UnitRange) ? "$(first(line))-$(last(line))" : line)"
7272
end

0 commit comments

Comments
 (0)