Skip to content

Commit e7c339f

Browse files
authored
remove uses of @Module.macro (#48316)
1 parent 15b7c6b commit e7c339f

File tree

17 files changed

+29
-29
lines changed

17 files changed

+29
-29
lines changed

base/abstractarray.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ end
936936

937937
## from general iterable to any array
938938

939-
# This is `@Experimental.max_methods 1 function copyto! end`, which is not
939+
# This is `Experimental.@max_methods 1 function copyto! end`, which is not
940940
# defined at this point in bootstrap.
941941
typeof(function copyto! end).name.max_methods = UInt8(1)
942942

base/compiler/compiler.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ ntuple(f, n) = (Any[f(i) for i = 1:n]...,)
5050

5151
# core operations & types
5252
function return_type end # promotion.jl expects this to exist
53-
is_return_type(@Core.nospecialize(f)) = f === return_type
53+
is_return_type(Core.@nospecialize(f)) = f === return_type
5454
include("promotion.jl")
5555
include("tuple.jl")
5656
include("pair.jl")

base/compiler/ssair/verify.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ function verify_ir(ir::IRCode, print::Bool=true,
111111
error("")
112112
end
113113
if !(idx in ir.cfg.blocks[s].preds)
114-
#@Base.show ir.cfg
115-
#@Base.show ir
116-
#@Base.show ir.argtypes
114+
#Base.@show ir.cfg
115+
#Base.@show ir
116+
#Base.@show ir.argtypes
117117
@verify_error "Successor $s of block $idx not in predecessor list"
118118
error("")
119119
end
@@ -192,8 +192,8 @@ function verify_ir(ir::IRCode, print::Bool=true,
192192
end
193193
end
194194
if !(edge == 0 && bb == 1) && !(edge in ir.cfg.blocks[bb].preds)
195-
#@Base.show ir.argtypes
196-
#@Base.show ir
195+
#Base.@show ir.argtypes
196+
#Base.@show ir
197197
@verify_error "Edge $edge of φ node $idx not in predecessor list"
198198
error("")
199199
end

base/docs/Docs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ You can document an object after its definition by
3939
@doc "foo" function_to_doc
4040
@doc "bar" TypeToDoc
4141
42-
For macros, the syntax is `@doc "macro doc" :(@Module.macro)` or `@doc "macro doc"
42+
For macros, the syntax is `@doc "macro doc" :(Module.@macro)` or `@doc "macro doc"
4343
:(string_macro"")` for string macros. Without the quote `:()` the expansion of the macro
4444
will be documented.
4545

stdlib/Distributed/test/distributed_exec.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,15 +302,15 @@ end
302302

303303
# Tests for issue #23109 - should not hang.
304304
f = @spawnat :any rand(1, 1)
305-
@Base.Experimental.sync begin
305+
Base.Experimental.@sync begin
306306
for _ in 1:10
307307
@async fetch(f)
308308
end
309309
end
310310

311311
wid1, wid2 = workers()[1:2]
312312
f = @spawnat wid1 rand(1,1)
313-
@Base.Experimental.sync begin
313+
Base.Experimental.@sync begin
314314
@async fetch(f)
315315
@async remotecall_fetch(()->fetch(f), wid2)
316316
end

stdlib/FileWatching/test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ end
7474

7575
# Odd numbers trigger reads, even numbers timeout
7676
for (i, intvl) in enumerate(intvls)
77-
@Experimental.sync begin
77+
Experimental.@sync begin
7878
global ready = 0
7979
global ready_c = Condition()
8080
for idx in 1:n

stdlib/InteractiveUtils/test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ end
331331

332332
# manually generate a broken function, which will break codegen
333333
# and make sure Julia doesn't crash
334-
@eval @noinline @Base.constprop :none f_broken_code() = 0
334+
@eval @noinline Base.@constprop :none f_broken_code() = 0
335335
let m = which(f_broken_code, ())
336336
let src = Base.uncompressed_ast(m)
337337
src.code = Any[

stdlib/Profile/src/Profile.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ every object as one so they can be easily counted. Otherwise, report the
12501250
actual size.
12511251
"""
12521252
function take_heap_snapshot(io::IOStream, all_one::Bool=false)
1253-
@Base._lock_ios(io, ccall(:jl_gc_take_heap_snapshot, Cvoid, (Ptr{Cvoid}, Cchar), io.handle, Cchar(all_one)))
1253+
Base.@_lock_ios(io, ccall(:jl_gc_take_heap_snapshot, Cvoid, (Ptr{Cvoid}, Cchar), io.handle, Cchar(all_one)))
12541254
end
12551255
function take_heap_snapshot(filepath::String, all_one::Bool=false)
12561256
open(filepath, "w") do io

stdlib/Sockets/test/runtests.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ defaultport = rand(2000:4000)
136136
write(sock, "Hello World\n")
137137

138138
# test "locked" println to a socket
139-
@Experimental.sync begin
139+
Experimental.@sync begin
140140
for i in 1:100
141141
@async println(sock, "a", 1)
142142
end
@@ -307,7 +307,7 @@ end
307307
bind(a, ip"127.0.0.1", randport)
308308
bind(b, ip"127.0.0.1", randport + 1)
309309

310-
@Experimental.sync begin
310+
Experimental.@sync begin
311311
let i = 0
312312
for _ = 1:30
313313
@async let msg = String(recv(a))
@@ -387,7 +387,7 @@ end
387387
# connect to it
388388
client_sock = connect(addr, port)
389389
test_done = false
390-
@Experimental.sync begin
390+
Experimental.@sync begin
391391
@async begin
392392
Base.wait_readnb(client_sock, 1)
393393
test_done || error("Client disconnected prematurely.")

test/ccall.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1921,7 +1921,7 @@ end
19211921
end
19221922

19231923
@testset "ccall_effects" begin
1924-
ctest_total(x) = @Base.assume_effects :total @ccall libccalltest.ctest(x::Complex{Int})::Complex{Int}
1924+
ctest_total(x) = Base.@assume_effects :total @ccall libccalltest.ctest(x::Complex{Int})::Complex{Int}
19251925
ctest_total_const() = Val{ctest_total(1 + 2im)}()
19261926
Core.Compiler.return_type(ctest_total_const, Tuple{}) == Val{2 + 0im}
19271927
end

0 commit comments

Comments
 (0)