From cbb30aeaee35beb21cbc68e7f905d780d3370182 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Fri, 30 Nov 2018 18:21:13 +0100 Subject: [PATCH] News and compat annotation for #29178 (Future.copy! to Base). --- NEWS.md | 1 + base/abstractarray.jl | 4 ++++ stdlib/Future/src/Future.jl | 5 ++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 681d256629e97..6af3d6decc1b1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -70,6 +70,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 ----------------------------- diff --git a/base/abstractarray.jl b/base/abstractarray.jl index 2a1d434641a23..7fb898a6d215b 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -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) diff --git a/stdlib/Future/src/Future.jl b/stdlib/Future/src/Future.jl index c49c0e444b376..1d70dba7c84de 100644 --- a/stdlib/Future/src/Future.jl +++ b/stdlib/Future/src/Future.jl @@ -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)