Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate the core::raw / std::raw module #84207

Merged
merged 4 commits into from
Apr 18, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions library/core/src/raw.rs
Original file line number Diff line number Diff line change
@@ -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.
//!
Expand Down
1 change: 1 addition & 0 deletions library/std/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it wants this to be:

Suggested change
#[allow(deprecated_in_future)]
#[allow(deprecated)]

given that 1.53.0 is already the present as far as nightly is concerned. Otherwise it's currently failing with:

error: use of deprecated module `core::raw`: use pointer metadata APIs instead https://github.com/rust-lang/rust/issues/81513
   --> library/std/src/lib.rs:460:9
    |
460 | pub use core::raw;
    |         ^^^^^^^^^
    |
    = note: `-D deprecated` implied by `-D warnings`

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like stage0 (compiling from beta) emits deprecated_in_future and stage1+ emits deprecated

pub use core::raw;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::result;
Expand Down