about summary refs log tree commit diff
path: root/src/librustc_unicode
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-06-11 05:05:20 +0000
committerbors <bors@rust-lang.org>2015-06-11 05:05:20 +0000
commit37cf025f1c04b2deab2afe7dd08c1f4fa2cb18d6 (patch)
treeadb665019434fc36ab8f28af0a55d8a12b88dda6 /src/librustc_unicode
parent2fbbd54afe4297032f521fa80ed0e5230d6e03e3 (diff)
parente87c62fb12e6b02cfc39fc2a16c315615714757a (diff)
Auto merge of #26154 - pmarcelll:master, r=Gankro
Various methods in both libcore/char.rs and librustc_unicode/char.rs were previously marked with #[inline], now every method is marked in char's impl blocks.
Partially fixes #26124.
EDIT: I'm not familiar with pull reqests (yet), apparently Github added my second commit to thit PR...
Fixes #26124 
Diffstat (limited to 'src/librustc_unicode')
-rw-r--r--src/librustc_unicode/char.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/librustc_unicode/char.rs b/src/librustc_unicode/char.rs
index 5b1300b18b6..a8bee00f4a9 100644
--- a/src/librustc_unicode/char.rs
+++ b/src/librustc_unicode/char.rs
@@ -174,6 +174,7 @@ impl char {
     /// assert_eq!('f'.to_digit(16), Some(15));
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
+    #[inline]
     pub fn to_digit(self, radix: u32) -> Option<u32> { C::to_digit(self, radix) }
 
     /// Returns an iterator that yields the hexadecimal Unicode escape of a
@@ -212,6 +213,7 @@ impl char {
     /// assert_eq!(heart, r"\u{2764}");
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
+    #[inline]
     pub fn escape_unicode(self) -> EscapeUnicode { C::escape_unicode(self) }
 
     /// Returns an iterator that yields the 'default' ASCII and
@@ -250,6 +252,7 @@ impl char {
     /// assert_eq!(quote, "\\\"");
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
+    #[inline]
     pub fn escape_default(self) -> EscapeDefault { C::escape_default(self) }
 
     /// Returns the number of bytes this character would need if encoded in
@@ -263,6 +266,7 @@ impl char {
     /// assert_eq!(n, 2);
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
+    #[inline]
     pub fn len_utf8(self) -> usize { C::len_utf8(self) }
 
     /// Returns the number of 16-bit code units this character would need if
@@ -276,6 +280,7 @@ impl char {
     /// assert_eq!(n, 1);
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
+    #[inline]
     pub fn len_utf16(self) -> usize { C::len_utf16(self) }
 
     /// Encodes this character as UTF-8 into the provided byte buffer, and then
@@ -310,6 +315,7 @@ impl char {
     /// ```
     #[unstable(feature = "unicode",
                reason = "pending decision about Iterator/Writer/Reader")]
+    #[inline]
     pub fn encode_utf8(self, dst: &mut [u8]) -> Option<usize> { C::encode_utf8(self, dst) }
 
     /// Encodes this character as UTF-16 into the provided `u16` buffer, and
@@ -344,6 +350,7 @@ impl char {
     /// ```
     #[unstable(feature = "unicode",
                reason = "pending decision about Iterator/Writer/Reader")]
+    #[inline]
     pub fn encode_utf16(self, dst: &mut [u16]) -> Option<usize> { C::encode_utf16(self, dst) }
 
     /// Returns whether the specified character is considered a Unicode
@@ -527,5 +534,6 @@ impl char {
                  since = "1.0.0")]
     #[unstable(feature = "unicode",
                reason = "needs expert opinion. is_cjk flag stands out as ugly")]
+    #[inline]
     pub fn width(self, is_cjk: bool) -> Option<usize> { charwidth::width(self, is_cjk) }
 }