aboutsummaryrefslogtreecommitdiff
path: root/libcore/raw.rs
diff options
context:
space:
mode:
authorpravic <[email protected]>2016-04-29 21:16:15 +0300
committerpravic <[email protected]>2016-04-29 21:16:15 +0300
commit77e9a3167b4aaadf3583a0c1d1ee0d9e63c9a000 (patch)
tree710e445d56a1a582b8eff19b7b4b180276eae122 /libcore/raw.rs
parenttweak: /driver option specifies /fixed:no implicitly as well (diff)
downloadarchived-kmd-env-rs-77e9a3167b4aaadf3583a0c1d1ee0d9e63c9a000.tar.xz
archived-kmd-env-rs-77e9a3167b4aaadf3583a0c1d1ee0d9e63c9a000.zip
update libcore to 2016-04-29 nightly
Diffstat (limited to 'libcore/raw.rs')
-rw-r--r--libcore/raw.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/libcore/raw.rs b/libcore/raw.rs
index 20c85b5..19226d8 100644
--- a/libcore/raw.rs
+++ b/libcore/raw.rs
@@ -60,12 +60,17 @@ use mem;
/// ```
#[repr(C)]
#[allow(missing_debug_implementations)]
+#[rustc_deprecated(reason = "use raw accessors/constructors in `slice` module",
+ since = "1.9.0")]
+#[unstable(feature = "raw", issue = "27751")]
pub struct Slice<T> {
pub data: *const T,
pub len: usize,
}
+#[allow(deprecated)]
impl<T> Copy for Slice<T> {}
+#[allow(deprecated)]
impl<T> Clone for Slice<T> {
fn clone(&self) -> Slice<T> { *self }
}
@@ -152,6 +157,9 @@ pub struct TraitObject {
/// This trait is meant to map equivalences between raw structs and their
/// corresponding rust values.
+#[rustc_deprecated(reason = "use raw accessors/constructors in `slice` module",
+ since = "1.9.0")]
+#[unstable(feature = "raw", issue = "27751")]
pub unsafe trait Repr<T> {
/// This function "unwraps" a rust value (without consuming it) into its raw
/// struct representation. This can be used to read/write different values
@@ -161,5 +169,7 @@ pub unsafe trait Repr<T> {
fn repr(&self) -> T { unsafe { mem::transmute_copy(&self) } }
}
+#[allow(deprecated)]
unsafe impl<T> Repr<Slice<T>> for [T] {}
+#[allow(deprecated)]
unsafe impl Repr<Slice<u8>> for str {}