Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
std: Align
raw
modules with unsafe conventions
This commit is an implementation of [RFC 240][rfc] when applied to the standard library. It primarily deprecates the entirety of `string::raw`, `vec::raw`, `slice::raw`, and `str::raw` in favor of associated functions, methods, and other free functions. The detailed renaming is: * slice::raw::buf_as_slice => slice::with_raw_buf * slice::raw::mut_buf_as_slice => slice::with_raw_mut_buf * slice::shift_ptr => deprecated with no replacement * slice::pop_ptr => deprecated with no replacement * str::raw::from_utf8 => str::from_utf8_unchecked * str::raw::c_str_to_static_slice => str::from_c_str * str::raw::slice_bytes => deprecated for slice_unchecked (slight semantic diff) * str::raw::slice_unchecked => str.slice_unchecked * string::raw::from_parts => String::from_raw_parts * string::raw::from_buf_len => String::from_raw_buf_len * string::raw::from_buf => String::from_raw_buf * string::raw::from_utf8 => String::from_utf8_unchecked * vec::raw::from_buf => Vec::from_raw_buf All previous functions exist in their `#[deprecated]` form, and the deprecation messages indicate how to migrate to the newer variants. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0240-unsafe-api-location.md [breaking-change] Closes #17863
- Loading branch information
1 parent
399ff25
commit 8ca27a6
Showing
15 changed files
with
304 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
8ca27a6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from aturon
at alexcrichton@8ca27a6
8ca27a6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging alexcrichton/rust/issue-17863 = 8ca27a6 into auto
8ca27a6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alexcrichton/rust/issue-17863 = 8ca27a6 merged ok, testing candidate = 641e2a1
8ca27a6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/2404
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/2402
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/2395
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/2402
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/2396
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/2395
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/2395
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/2399
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/2392
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/2391
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/2394
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/2056
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/2052
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/2058
success: http://buildbot.rust-lang.org/builders/auto-win-64-opt/builds/895
success: http://buildbot.rust-lang.org/builders/auto-win-64-nopt-t/builds/889
success: http://buildbot.rust-lang.org/builders/auto-win-64-nopt-c/builds/884
8ca27a6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = 641e2a1