mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
std: Update stable since for core::char
Also add `#[doc(hidden)]` to a few internal functions.
This commit is contained in:
+3
-1
@@ -14,7 +14,7 @@
|
||||
|
||||
#![allow(non_snake_case)]
|
||||
#![doc(primitive = "char")]
|
||||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
#![stable(feature = "core_char", since = "1.2.0")]
|
||||
|
||||
use iter::Iterator;
|
||||
use mem::transmute;
|
||||
@@ -225,6 +225,7 @@ fn encode_utf16(self, dst: &mut [u16]) -> Option<usize> {
|
||||
#[inline]
|
||||
#[unstable(feature = "char_internals",
|
||||
reason = "this function should not be exposed publicly")]
|
||||
#[doc(hidden)]
|
||||
pub fn encode_utf8_raw(code: u32, dst: &mut [u8]) -> Option<usize> {
|
||||
// Marked #[inline] to allow llvm optimizing it away
|
||||
if code < MAX_ONE_B && !dst.is_empty() {
|
||||
@@ -258,6 +259,7 @@ pub fn encode_utf8_raw(code: u32, dst: &mut [u8]) -> Option<usize> {
|
||||
#[inline]
|
||||
#[unstable(feature = "char_internals",
|
||||
reason = "this function should not be exposed publicly")]
|
||||
#[doc(hidden)]
|
||||
pub fn encode_utf16_raw(mut ch: u32, dst: &mut [u16]) -> Option<usize> {
|
||||
// Marked #[inline] to allow llvm optimizing it away
|
||||
if (ch & 0xFFFF) == ch && !dst.is_empty() {
|
||||
|
||||
Reference in New Issue
Block a user