rust/library/std/src/os
Matthias Krüger a45f69f27d
Rollup merge of #100822 - WaffleLapkin:no_offset_question_mark, r=scottmcm
Replace most uses of `pointer::offset` with `add` and `sub`

As PR title says, it replaces `pointer::offset` in compiler and standard library with `pointer::add` and `pointer::sub`. This generally makes code cleaner, easier to grasp and removes (or, well, hides) integer casts.

This is generally trivially correct, `.offset(-constant)` is just `.sub(constant)`, `.offset(usized as isize)` is just `.add(usized)`, etc. However in some cases we need to be careful with signs of things.

r? ````@scottmcm````

_split off from #100746_
2022-08-21 16:54:07 +02:00
..
android Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
dragonfly Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
emscripten Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
espidf Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
fd Adjust cfgs 2022-08-12 16:28:15 -04:00
fortanix_sgx Update fortanix-sgx-abi and export some useful SGX usercall traits 2022-08-16 11:01:53 -07:00
freebsd Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
fuchsia Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
haiku Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
hermit Move OsStringExt and OsStrExt to std::os 2021-06-20 11:55:01 +02:00
horizon Update libc::stat field names 2022-06-13 20:44:58 -07:00
illumos Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
ios Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
l4re Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
linux Auto merge of #95960 - jhpratt:remove-rustc_deprecated, r=compiler-errors 2022-05-09 04:47:30 +00:00
macos Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
netbsd Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
openbsd Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
raw Provide C FFI types via core::ffi, not just in std 2022-03-01 17:16:05 -08:00
redox Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
solaris Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
solid Add SOLID targets 2021-09-28 11:31:47 +09:00
unix Rollup merge of #100822 - WaffleLapkin:no_offset_question_mark, r=scottmcm 2022-08-21 16:54:07 +02:00
vxworks Take sys/vxworks/{fd,fs,io} from sys/unix instead. 2020-10-16 06:19:00 +02:00
wasi Allow using stable os::fd::raw items through unstable os::wasi module 2022-07-27 10:25:13 -04:00
windows Rollup merge of #98583 - joshtriplett:stabilize-windows-symlink-types, r=thomcc 2022-07-27 11:52:52 +09:00
mod.rs Library changes for Apple WatchOS 2022-07-20 08:57:36 +01:00