about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/attributes.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2025-02-17 17:06:10 +0100
committerGitHub <noreply@github.com>2025-02-17 17:06:10 +0100
commit10018d8e10e8aee01454c362a2793ac9cdaedeab (patch)
tree7f3227c1a2442e2eefddc81edd6f3d2505e8e93e /compiler/rustc_codegen_llvm/src/attributes.rs
parent97962d7643300b91c102496ba3ab6d9279d2c536 (diff)
parent711247413465fc015420574d6afe929186ab0bb4 (diff)
downloadrust-10018d8e10e8aee01454c362a2793ac9cdaedeab.tar.gz
rust-10018d8e10e8aee01454c362a2793ac9cdaedeab.zip
Rollup merge of #137165 - thaliaarchi:file-tell, r=ChrisDenton
Use `tell` for `<File as Seek>::stream_position`

Some platforms have a more efficient way to get the current offset of the file than by seeking. For example, Wasi has `fd_tell` and SOLID has `SOLID_FS_Ftell`. Implement `<File as Seek>::stream_position()` in terms of those.

I do not use any APIs that were not already used in `std`. Although, the `libc` crate has [`ftell`](https://docs.rs/libc/latest/libc/fn.ftell.html), [`ftello`](https://docs.rs/libc/latest/libc/fn.ftello.html), and [`ftello64`](https://docs.rs/libc/latest/libc/fn.ftello64.html), I do not know platform coverage. It appears that Windows has no `tell`-like API.

I have checked that it builds on each relevant platform.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/attributes.rs')
0 files changed, 0 insertions, 0 deletions