Skip to content

Commit

Permalink
News and compat annotation for #29178 (Future.copy! to Base).
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikekre committed Dec 4, 2018
1 parent 78e7da5 commit 3489e6e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Standard library changes
* New `edit(m::Module)` method which opens the main source file for module `m` ([#29636]).
* `Base.@kwdef` can now be used for parametric structs, and for structs with supertypes ([#29316]).
* `merge(::NamedTuple, ::NamedTuple...)` can now be used with more than 2 `NamedTuple`s ([#29259]).
* `Future.copy!` has been moved to `Base` ([#29178]).

Compiler/Runtime improvements
-----------------------------
Expand Down
4 changes: 4 additions & 0 deletions base/abstractarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,10 @@ If `dst` and `src` are of the same type, `dst == src` should hold after
the call. If `dst` and `src` are multidimensional arrays, they must have
equal [`axes`](@ref).
See also [`copyto!`](@ref).
!!! compat "Julia 1.1"
This method requires at least Julia 1.1. In Julia 1.0 this method
is available from the `Future` standard library as `Future.copy!`.
"""
copy!(dst::AbstractVector, src::AbstractVector) = append!(empty!(dst), src)

Expand Down
5 changes: 4 additions & 1 deletion stdlib/Future/src/Future.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ using Random
Future.copy!(dst, src) -> dst
Copy `src` into `dst`.
This function has now been moved into `Base`, consider using `copy!(dst, src)` instead.
!!! compat "Julia 1.1"
This function has moved to `Base` with Julia 1.1, consider using `copy!(dst, src)` instead.
`Future.copy!` will be deprecated in the future.
"""
copy!(dst::AbstractSet, src::AbstractSet) = Base.copy!(dst, src)
copy!(dst::AbstractDict, src::AbstractDict) = Base.copy!(dst, src)
Expand Down

0 comments on commit 3489e6e

Please sign in to comment.