about summary refs log tree commit diff
path: root/library
AgeCommit message (Collapse)AuthorLines
2025-03-10debug-assert that the size_hint is well-formed in `collect`Scott McMurray-0/+9
2025-03-10Move `offset_of_enum` documentation to unstable book; add `offset_of_slice`.Kevin Reid-17/+9
2025-03-10Expand and organize `offset_of!` documentation.Kevin Reid-21/+41
* Give example of how to get the offset of an unsized tail field (prompted by discussion <https://github.com/rust-lang/rust/pull/133055#discussion_r1986422206>). * Specify the return type. * Add section headings. * Reduce “Visibility is respected…”, to a single sentence.
2025-03-10Rewrite example to not deal with `Copy` at all.Kevin Reid-17/+19
It also now demonstrates how to avoid memory leaks.
2025-03-10Remove unused fileNicole L-4/+0
2025-03-10Rewrite comments about dropping and leaking.Kevin Reid-16/+26
2025-03-10Update Trusty support to account for recent libstd reorganizationNicole L-7/+3
2025-03-10Remove custom TLS implementation for Trusty targetsNicole LeGare-39/+2
2025-03-10Disable unsupported testsNicole LeGare-4/+8
Unclear why this needs to be done manually and is not done by the existing Trusty patches.
2025-03-10Format after patches have been appliedNicole LeGare-13/+17
2025-03-10Apply rustc-0054-Add-std-os-fd-support-for-Trusty.patchNicole LeGare-6/+43
2025-03-10Apply rustc-0023-Add-Trusty-OS-support-to-Rust-std.patchNicole LeGare-0/+164
2025-03-10Mark some std tests as requiring `panic = "unwind"`Paul Menage-2/+39
This allows these test modules to pass on builds/targets without unwinding support, where `panic = "abort"` - the ignored tests are for functionality that's not supported on those targets.
2025-03-10Changing #[stable] tagNathaniel Woods-1/+1
2025-03-10Added `Clone` implementation for `ChunkBy`Nathaniel Woods-0/+20
2025-03-10add missing doc for intrinsicLemonJ-7/+24
2025-03-10Remove stack overflow handler for cygwin王宇逸-8/+3
2025-03-10Use __xpg_strerror_r on cygwin王宇逸-1/+6
2025-03-10Readd os::cygwin::raw as pub(crate)王宇逸-1/+5
2025-03-10Unify cygwin & horizon random impl王宇逸-16/+5
2025-03-10Impl cygwin rand with getrandom王宇逸-11/+13
2025-03-10Remove std::os::cygwin::raw王宇逸-91/+0
2025-03-10Fix code style王宇逸-4/+14
2025-03-10Revert changes for rtstartup王宇逸-2/+2
2025-03-10Fix building for cygwin王宇逸-5/+14
2025-03-10Fix `std::sys::unix::set_linger` for CygwinOokiineko-0/+11
Signed-off-by: Ookiineko <chiisaineko@protonmail.com>
2025-03-10Initial STD support for Cygwin王宇逸-9/+247
Signed-off-by: Ookiineko <chiisaineko@protonmail.com>
2025-03-10Add #[track_caller] to from_usize.Mara Bos-0/+1
2025-03-10Remove unnecessary semicolon.Mara Bos-1/+1
2025-03-10Update tests.Mara Bos-14/+14
2025-03-10Limit formatting width and precision to 16 bits.Mara Bos-35/+46
2025-03-10Add comments for #[no_sanitize(cfi)] in stdlibBastian Kersting-1/+11
2025-03-10Disable CFI for weakly linked syscallsBastian Kersting-0/+27
Currently, when enabling CFI via -Zsanitizer=cfi and executing e.g. std::sys::random::getrandom, we can observe a CFI violation. This is the case for all consumers of the std::sys::pal::weak::weak macro, as it is defining weak functions which don't show up in LLVM IR metadata. CFI fails for all these functions. Similar to other such cases in https://github.com/rust-lang/rust/issues/115199, this change stops emitting the CFI typecheck for consumers of the macro via the \#[no_sanitize(cfi)] attribute.
2025-03-10fix copy typoLemonJ-4/+4
2025-03-10fix ptr inconsistency in Rc ArcLemonJ-23/+47
2025-03-10Implement default methods for io::Empty and io::SinkThalia Archibald-11/+216
Eliminate any redundant, unobservable logic from the their default method implementations. The observable changes are that `Write::write_fmt` for both types now ignores the formatting arguments, so a user fmt impl which has side effects is not invoked, and `Write::write_all_vectored` for both types does not advance the borrowed buffers. Neither behavior is guaranteed by the docs and the latter is documented as unspecified. `Empty` is not marked as vectored, so that `Chain<Empty, _>` and `Chain<_, Empty>` are not forced to be vectored.
2025-03-10Rollup merge of #138074 - thaliaarchi:hermit-seek, r=ChrisDentonMatthias Krüger-8/+25
Support `File::seek` for Hermit `lseek` was added in `hermit-abi` in commit [87dd201](https://github.com/hermit-os/hermit-rs/commit/87dd201a14ac7661e1a4b761273e24d750496286) (add missing interface for lseek, 2024-07-15), which was just released in version 0.5.0. cc ``@mkroening,`` ``@stlankes`` Fixes https://github.com/hermit-os/hermit-rs/issues/652
2025-03-10Rollup merge of #137585 - xizheyin:issue-135801, r=workingjubileeMatthias Krüger-5/+5
Update documentation to consistently use 'm' in atomic synchronization example Fixes #135801
2025-03-10Implement read_buf and vectored read/write for SGX stdioThalia Archibald-3/+49
2025-03-10Copy from userspace to MaybeUninitJethro Beekman-3/+42
Co-authored-by: Thalia Archibald <thalia@archibald.dev>
2025-03-10uefi: fs: Partially implement FileAttrAyush Singh-15/+11
- Just the permission and file type. - FileTimes will need some new conversion functions and thus will come with a future PR. Trying to keep things simple here. Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-03-10uefi: fs: Implement FileTypeAyush Singh-30/+10
- Similar to FilePermissions, using bool to represent the bitfield. - FileType cannot be changed, so no need to worry about converting back to attribute. Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-03-10uefi: fs: Implement FilePermissionAyush Singh-21/+16
- UEFI file permissions are indicated using a u64 bitfield used for readonly/filetype, etc. - Using normal bool with to and from attribute conversions to FilePermission from overriding some other bitfields. Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-03-09std: move stdio to `sys`joboet-150/+77
As per #117276, this moves the platform definitions of `Stdout` and friends into `sys`. This PR also unifies the UNIX and Hermit implementations and moves the `__rust_print_err` function needed by libunwind on SGX into the dedicated module for such helper functions.
2025-03-09Support File::seek for HermitThalia Archibald-5/+22
2025-03-09Update hermit-abi to 0.5.0Thalia Archibald-3/+3
2025-03-09Rollup merge of #138276 - bdbai:fix-uwp-ntopenfile, r=ChrisDentonMatthias Krüger-0/+11
Lazy load NtOpenFile for UWP Lazily load `NtOpenFile` to allow libraries targeting UWP to build and link. Fixes #138257 . r? `@ChrisDenton`
2025-03-09Rollup merge of #138233 - smmalis37:no-advapi32, r=ChrisDentonMatthias Krüger-1/+1
Windows: Don't link std (and run-make) against advapi32, except on win7 Std no longer depends on any functionality provided by advapi32, so we can remove it from the list of external libraries we link against. Except, the win7 targets do still rely on advapi32-provided functionality. This PR therefore moves linking against it to only occur on win7 targets, so that no new uses of it slip in without being noticed.
2025-03-09Rollup merge of #138228 - TDecking:master, r=jhprattMatthias Krüger-3/+8
Use `disjoint_bitor` inside `borrowing_sub` This makes the definition of `borrowing_sub` consistent with that of `carrying_add`.
2025-03-09Rollup merge of #137650 - thaliaarchi:move-fs-pal, r=NoratriebMatthias Krüger-46/+61
Move `fs` into `sys` Move platform definitions of `fs` into `std::sys`, as part of https://github.com/rust-lang/rust/issues/117276. cc `@joboet`