-
-
Notifications
You must be signed in to change notification settings - Fork 15.9k
Tracking Issue for #![feature(ptr_cast_slice)] #149103
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 RFCS-tracking-ready-to-stabilizeStatus: This is ready to stabilize; it may need a stabilization report and a PRStatus: This is ready to stabilize; it may need a stabilization report and a PRT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
Activity
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 RFCS-tracking-ready-to-stabilizeStatus: This is ready to stabilize; it may need a stabilization report and a PRStatus: This is ready to stabilize; it may need a stabilization report and a PRT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Feature gate:
#![feature(ptr_cast_slice)]This is a tracking issue for rust-lang/libs-team#693
This feature adds method calls on raw pointers that call into the respective
ptr::slice_from_raw_parts{_mut}method for the types*const T,*mut TandNonNull<T>to make using raw pointers more ergonomic in Rust by supporting postfix method chain syntax while creating slices.Public API
Steps / History
(Remember to update the
S-tracking-*label when checking boxes.)cast_slicefor raw pointer types #149110Unresolved Questions
the inference probleminfers:let null10: *const [u8] = ptr::slice_from_raw_parts(ptr::null(), 10);does not infer:let null10: *const [u8] = ptr::null().cast_slice(10);#![feature(ptr_cast_slice)]#149103 (comment)Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩