about summary refs log tree commit diff
path: root/library/std/src/os
AgeCommit message (Collapse)AuthorLines
2021-02-17std::src::os::raw: Refactor, introducing macro type_alias!Ian Jackson-54/+27
This file contained a lot of repetitive code. This was about to get considerably worse, with introduction of a slew of new aliases. No functional change. I've eyeballed the docs and they don't seem to have changed either. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2021-02-02Fix AArch64 types in std::os::rawAmanieu d'Antras-8/+8
2020-10-16Take sys/vxworks/{fd,fs,io} from sys/unix instead.Mara Bos-0/+18
2020-10-09doc: disambiguate stat in MetadataExt::as_raw_statJosh Stone-1/+1
A few architectures in `os::linux::raw` import `libc::stat`, rather than defining that type directly. However, that also imports the _function_ called `stat`, which makes this doc link ambiguous: error: `crate::os::linux::raw::stat` is both a struct and a function --> library/std/src/os/linux/fs.rs:21:19 | 21 | /// [`stat`]: crate::os::linux::raw::stat | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ambiguous link | = note: `-D broken-intra-doc-links` implied by `-D warnings` help: to link to the struct, prefix with the item type | 21 | /// [`stat`]: struct@crate::os::linux::raw::stat | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: to link to the function, add parentheses | 21 | /// [`stat`]: crate::os::linux::raw::stat() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ We want the `struct`, so it's now prefixed accordingly.
2020-09-28library/std: Set OS raw type definitions for sparc-unknown-linux-gnuJohn Paul Adrian Glaubitz-0/+1
2020-09-16library/std: raw: Add support for RISC-V 32-bitAlistair Francis-2/+4
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2020-09-16library/std: linux: Add support for RISC-V 32-bitAlistair Francis-1/+2
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2020-09-11Update `std::os` module documentation.Christiaan Dirkx-2/+4
Adds missing descriptions for the modules std::os::linux::fs and std::os::windows::io. Also adds punctuation for consistency with other descriptions.
2020-09-04Remove a useless allowed attrLzu Tao-2/+0
2020-09-03Auto merge of #73819 - euclio:rustdoc-summaries, r=jyn514,GuillaumeGomezbors-6/+6
rustdoc: do not use plain summary for trait impls Fixes #38386. Fixes #48332. Fixes #49430. Fixes #62741. Fixes #73474. Unfortunately this is not quite ready to go because the newly-working links trigger a bunch of linkcheck failures. The failures are tough to fix because the links are resolved relative to the implementor, which could be anywhere in the module hierarchy. (In the current docs, these links end up rendering as uninterpreted markdown syntax, so I don't think these failures are any worse than the status quo. It might be acceptable to just add them to the linkchecker whitelist.) Ideally this could be fixed with intra-doc links ~~but it isn't working for me: I am currently investigating if it's possible to solve it this way.~~ Opened #73829. EDIT: This is now ready!
2020-08-31std: move "mod tests/benches" to separate filesLzu Tao-21/+20
Also doing fmt inplace as requested.
2020-08-30fix broken trait method linksAndy Russell-6/+6
2020-08-27Rollup merge of #74730 - androm3da:fix_libstd_hexlinux_01, r=dtolnayDylan DPC-24/+24
Hexagon libstd: update type defs
2020-08-15Auto merge of #74576 - myfreeweb:freebsd-sanitizers, r=oli-obkbors-1/+13
Add sanitizer support on FreeBSD Restarting #47337. Everything is better now, no more weird llvm problems, well not everything: Unfortunately, the sanitizers don't have proper support for versioned symbols (https://github.com/google/sanitizers/issues/628), so `libc`'s usage of `stat@FBSD_1.0` and so on explodes, e.g. in calling `std::fs::metadata`. Building std (now easy thanks to cargo `-Zbuild-std`) and libc with `freebsd12/13` config via the `LIBC_CI=1` env variable is a good workaround… ``` LIBC_CI=1 RUSTFLAGS="-Z sanitizer=address" cargo +san-test -Zbuild-std run --target x86_64-unknown-freebsd --verbose ``` …*except* std won't build because there's no `st_lspare` in the ino64 version of the struct, so an std patch is required: ```diff --- i/src/libstd/os/freebsd/fs.rs +++ w/src/libstd/os/freebsd/fs.rs @@ -66,8 +66,6 @@ pub trait MetadataExt { fn st_flags(&self) -> u32; #[stable(feature = "metadata_ext2", since = "1.8.0")] fn st_gen(&self) -> u32; - #[stable(feature = "metadata_ext2", since = "1.8.0")] - fn st_lspare(&self) -> u32; } #[stable(feature = "metadata_ext", since = "1.1.0")] @@ -136,7 +134,4 @@ impl MetadataExt for Metadata { fn st_flags(&self) -> u32 { self.as_inner().as_inner().st_flags as u32 } - fn st_lspare(&self) -> u32 { - self.as_inner().as_inner().st_lspare as u32 - } } ``` I guess std could like.. detect that `libc` isn't built for the old ABI, and replace the implementation of `st_lspare` with a panic?
2020-08-14remove primitive type linksPrabakaran Kumaresshan-20/+0
2020-08-14Switch to intra-doc links in os/raw/*.mdPrabakaran Kumaresshan-33/+33
2020-08-11Revert #tymethodsPrabakaran Kumaresshan-6/+6
2020-08-11Switch to intra-doc links in library/std/src/os/*/fs.rsPrabakaran Kumaresshan-23/+23
2020-08-09Add RUST_STD_FREEBSD_12_ABI env variableGreg V-1/+13
Unfortunately, sanitizers do not support versioned symbols[1], so they break filesystem access via the legacy, pre-ino64 ABI. To use sanitizers on FreeBSD >= 12, we need to build the libc crate with LIBC_CI=1 to use the new ABI -- including the libc used for std. But that removes the st_lspare field std was expecting for the deprecated metadata extension. Add a way to skip that field to allow the build to work. [1]: https://github.com/google/sanitizers/issues/628
2020-07-27Hexagon libstd: update type defsBrian Cain-24/+24
2020-07-27mv std libs to library/mark-0/+4612