diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index 3d7c82c9a94..6b1e4bb4f8e 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -278,6 +278,8 @@ impl Vec { #[inline] #[unstable(feature = "vec_from_raw_buf", reason = "may be better expressed via composition")] + #[deprecated(since = "1.2.0", + reason = "use slice::from_raw_parts + .to_vec() instead")] pub unsafe fn from_raw_buf(ptr: *const T, elts: usize) -> Vec { let mut dst = Vec::with_capacity(elts); dst.set_len(elts);