about summary refs log tree commit diff
path: root/src/libcore/str
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2016-03-04 14:17:29 -0500
committerSteve Klabnik <steve@steveklabnik.com>2016-03-04 14:17:29 -0500
commitb99354f07f4533ffdea3613e8271b741ffcfd7e1 (patch)
tree8b6f33a3e860c771568d5b18c5151fc266752604 /src/libcore/str
parent1f0d928de88f2e87512bfff4f61c663eca10e712 (diff)
parent633cd84821431e93a3e40f662cbe00ba21755811 (diff)
downloadrust-b99354f07f4533ffdea3613e8271b741ffcfd7e1.tar.gz
rust-b99354f07f4533ffdea3613e8271b741ffcfd7e1.zip
Rollup merge of #32035 - ubsan:master, r=bluss
Just take out the `NOTE` and the `#[allow(improper_ctypes)]`
Diffstat (limited to 'src/libcore/str')
-rw-r--r--src/libcore/str/mod.rs2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs
index a555b859291..2d898b50e0c 100644
--- a/src/libcore/str/mod.rs
+++ b/src/libcore/str/mod.rs
@@ -1095,8 +1095,6 @@ fn eq_slice(a: &str, b: &str) -> bool {
 /// faster than comparing each byte in a loop.
 #[inline]
 unsafe fn cmp_slice(a: &str, b: &str, len: usize) -> i32 {
-    // NOTE: In theory n should be libc::size_t and not usize, but libc is not available here
-    #[allow(improper_ctypes)]
     extern { fn memcmp(s1: *const i8, s2: *const i8, n: usize) -> i32; }
     memcmp(a.as_ptr() as *const i8, b.as_ptr() as *const i8, len)
 }