From b80a96c286628453dec50b9609570949d5d387a9 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 15 Apr 2021 02:25:40 +0200 Subject: [PATCH] Deprecate the core::raw / std::raw module It only contains the `TraitObject` struct which exposes components of wide pointer. Pointer metadata APIs are designed to replace this: https://github.com/rust-lang/rust/issues/81513 --- library/core/src/raw.rs | 4 ++++ library/std/src/lib.rs | 1 + 2 files changed, 5 insertions(+) diff --git a/library/core/src/raw.rs b/library/core/src/raw.rs index 1227d9b01f011..6d1e28f4cd7d7 100644 --- a/library/core/src/raw.rs +++ b/library/core/src/raw.rs @@ -1,5 +1,9 @@ #![allow(missing_docs)] #![unstable(feature = "raw", issue = "27751")] +#![rustc_deprecated( + since = "1.53.0", + reason = "use pointer metadata APIs instead https://github.com/rust-lang/rust/issues/81513" +)] //! Contains struct definitions for the layout of compiler built-in types. //! diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index 90603cd983677..39280f569c440 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -456,6 +456,7 @@ pub use core::pin; #[stable(feature = "rust1", since = "1.0.0")] pub use core::ptr; #[stable(feature = "rust1", since = "1.0.0")] +#[allow(deprecated_in_future)] pub use core::raw; #[stable(feature = "rust1", since = "1.0.0")] pub use core::result;