Skip to content

Commit

Permalink
Drop compat code for copyto! from #448
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholters committed Oct 4, 2019
1 parent 5c47af7 commit d229e26
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 17 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ Currently, the `@compat` macro supports the following syntaxes:

* `reprmime(mime, x)` is now `repr(mime, x)` ([#25990]) and `mimewritable` is now `showable` ([#26089]).

* `copy!` and `unsafe_copy!` are now `copyto!` and `unsafe_copyto!` ([#24808]).

* `module_parent`, `Base.function_module`, and `Base.datatype_module` are now methods of
a new function called `parentmodule` ([#25629]).

Expand Down
7 changes: 0 additions & 7 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,6 @@ end
end
end

# 0.7.0-DEV.3057
@static if !isdefined(Base, :copyto!)
const copyto! = Base.copy!
const unsafe_copyto! = Base.unsafe_copy!
export copyto!, unsafe_copyto!
end

# 0.7.0-DEV.3272, keep this definition for 0.6 compatibility
@static if VERSION < v"0.7.0-DEV.3272"
Base.contains(str::AbstractString, r::Regex) = ismatch(r, str)
Expand Down
8 changes: 8 additions & 0 deletions test/old.jl
Original file line number Diff line number Diff line change
Expand Up @@ -605,3 +605,11 @@ end
# 0.7.0-DEV.3172
@test replace("abcb", "b"=>"c") == "accc"
@test replace("abcb", "b"=>"c", count=1) == "accb"

# 0.7.0-DEV.3057
let A = [0, 0, 0], B = [1, 2, 3]
@test copyto!(A, B) === A == B
end
let A = [0, 0, 0], B = [1, 2, 3]
@test unsafe_copyto!(A, 2, B, 1, 1) === A == [0, 1, 0]
end
8 changes: 0 additions & 8 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,6 @@ let A = [1]
@test x == 1
end

# 0.7.0-DEV.3057
let A = [0, 0, 0], B = [1, 2, 3]
@test copyto!(A, B) === A == B
end
let A = [0, 0, 0], B = [1, 2, 3]
@test unsafe_copyto!(A, 2, B, 1, 1) === A == [0, 1, 0]
end

# 0.7.0-DEV.3025
let c = CartesianIndices((1:3, 1:2)), l = LinearIndices((1:3, 1:2))
@test LinearIndices(c) == collect(l)
Expand Down

0 comments on commit d229e26

Please sign in to comment.