-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Tracking Issue for #[deprecated_safe] attribute #94978
Copy link
Copy link
Open
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-deprecated_safe`#![feature(deprecated_safe)]``#![feature(deprecated_safe)]`S-tracking-unimplementedStatus: The feature has not been implemented.Status: The feature has not been implemented.T-langRelevant to the language teamRelevant to the language teamT-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-deprecated_safe`#![feature(deprecated_safe)]``#![feature(deprecated_safe)]`S-tracking-unimplementedStatus: The feature has not been implemented.Status: The feature has not been implemented.T-langRelevant to the language teamRelevant to the language teamT-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Rejected/Not lang
This is a tracking issue for the lang-team MCP "Add #[deprecated_safe] attribute..." (rust-lang/lang-team#147).
The feature gate for the issue is
#![feature(deprecated_safe)].About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Public API
Apply
#[deprecated_safe]to a pre-existing function or trait that is currently safe but needs to be marked unsafe, which is normally a breaking change. Marking the function or trait as unsafe and applying#[deprecated_safe]will cause a "safeness deprecation" warning to be emitted anywhere that a compiler error would have been, maintaining backwards compatibility. While this is unsound, the intended use is to address a pre-existing unsoundness in a backwards compatible fashion using deprecations.Steps
Unresolved Questions
unsafe {}block couldn't be added automatically. Is a non-autofixable edition change like that acceptable?Implementation history