core: Don't require a copyable T for vec::push
This commit is contained in:
parent
b1eb4579c6
commit
397f33fd35
@ -334,7 +334,7 @@ fn pop<T>(&v: [const T]) -> T unsafe {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[doc = "Append an element to a vector"]
|
#[doc = "Append an element to a vector"]
|
||||||
fn push<T: copy>(&v: [const T], initval: T) {
|
fn push<T>(&v: [const T], +initval: T) {
|
||||||
v += [initval];
|
v += [initval];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user