diff options
| author | Aria Beingessner <a.beingessner@gmail.com> | 2022-03-28 00:43:18 -0400 |
|---|---|---|
| committer | Aria Beingessner <a.beingessner@gmail.com> | 2022-03-29 20:18:28 -0400 |
| commit | 28576e9c511219ba8bf79c241fc52f23eeceaa2b (patch) | |
| tree | 15255415056db26088bb87fb8b07f510f76c1f31 /library/std/src/sys/unix/memchr.rs | |
| parent | 5f720fa55e3f9bc6a59ea8caf1fdff18405d3b65 (diff) | |
| download | rust-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.rs | 2 |
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()) } } |
