about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2014-06-07 15:32:01 +0100
committerSimon Sapin <simon.sapin@exyr.org>2014-06-17 23:43:18 +0200
commitd7e01b5809cd600a30bab29da698acb3d1b52409 (patch)
tree286205104bc60273b9dae149b21c10a4b94a1764 /src/libcore
parentbccdba02960b3cd428addbc2c856065ebb81eb04 (diff)
downloadrust-d7e01b5809cd600a30bab29da698acb3d1b52409.tar.gz
rust-d7e01b5809cd600a30bab29da698acb3d1b52409.zip
Add a b"xx" byte string literal of type &'static [u8].
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/str.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libcore/str.rs b/src/libcore/str.rs
index c01997f1c42..84ffb7fb20e 100644
--- a/src/libcore/str.rs
+++ b/src/libcore/str.rs
@@ -560,6 +560,8 @@ Section: Comparing strings
 
 // share the implementation of the lang-item vs. non-lang-item
 // eq_slice.
+/// NOTE: This function is (ab)used in rustc::middle::trans::_match
+/// to compare &[u8] byte slices that are not necessarily valid UTF-8.
 #[inline]
 fn eq_slice_(a: &str, b: &str) -> bool {
     #[allow(ctypes)]
@@ -572,6 +574,8 @@ fn eq_slice_(a: &str, b: &str) -> bool {
 }
 
 /// Bytewise slice equality
+/// NOTE: This function is (ab)used in rustc::middle::trans::_match
+/// to compare &[u8] byte slices that are not necessarily valid UTF-8.
 #[cfg(not(test))]
 #[lang="str_eq"]
 #[inline]