about summary refs log tree commit diff
path: root/library/std/src/sys/unix/memchr.rs
diff options
context:
space:
mode:
authorAria Beingessner <a.beingessner@gmail.com>2022-03-28 00:43:18 -0400
committerAria Beingessner <a.beingessner@gmail.com>2022-03-29 20:18:28 -0400
commit28576e9c511219ba8bf79c241fc52f23eeceaa2b (patch)
tree15255415056db26088bb87fb8b07f510f76c1f31 /library/std/src/sys/unix/memchr.rs
parent5f720fa55e3f9bc6a59ea8caf1fdff18405d3b65 (diff)
downloadrust-28576e9c511219ba8bf79c241fc52f23eeceaa2b.tar.gz
rust-28576e9c511219ba8bf79c241fc52f23eeceaa2b.zip
mark FIXMES for all the places found that are probably offset_from
Diffstat (limited to 'library/std/src/sys/unix/memchr.rs')
-rw-r--r--library/std/src/sys/unix/memchr.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/sys/unix/memchr.rs b/library/std/src/sys/unix/memchr.rs
index a3e4f8ff56a..73ba604eccb 100644
--- a/library/std/src/sys/unix/memchr.rs
+++ b/library/std/src/sys/unix/memchr.rs
@@ -26,6 +26,8 @@ pub fn memrchr(needle: u8, haystack: &[u8]) -> Option<usize> {
                 haystack.len(),
             )
         };
+        // FIXME: this should *likely* use `offset_from`, but more
+        // investigation is needed (including running tests in miri).
         if p.is_null() { None } else { Some(p.addr() - haystack.as_ptr().addr()) }
     }