about summary refs log tree commit diff
path: root/library/std/src
AgeCommit message (Collapse)AuthorLines
2024-06-12Auto merge of #126273 - pietroalbini:pa-bootstrap-update, r=Mark-Simulacrumbors-30/+14
Bump stage0 to 1.80.0 r? `@Mark-Simulacrum`
2024-06-12Rollup merge of #126322 - m-ou-se:panicinfo-and-panicinfo-2, r=RalfJungGuillaume Gomez-4/+1
Follow up to splitting core's PanicInfo and std's PanicInfo
2024-06-12Rollup merge of #126039 - dpaoliello:arm64ecbuild, r=davidtwcoGuillaume Gomez-1/+5
Promote `arm64ec-pc-windows-msvc` to tier 2 MCP: <https://github.com/rust-lang/compiler-team/issues/746> * Update platform support docs * Add `arm64ec-pc-windows-msvc` as a target to the existing AArch64 Windows build in CI. * Fix docs build break. * Add `arm64ec-pc-windows-msvc` to build manifest. CI build (succeeded, but upload to S3 failed): <https://github.com/rust-lang/rust/actions/runs/9388227822/job/25853013083?pr=126039>
2024-06-12Use payload_as_str instead of two downcasts.Mara Bos-4/+1
2024-06-12Auto merge of #126319 - workingjubilee:rollup-lendnud, r=workingjubileebors-6/+13
Rollup of 16 pull requests Successful merges: - #123374 (DOC: Add FFI example for slice::from_raw_parts()) - #124514 (Recommend to never display zero disambiguators when demangling v0 symbols) - #125978 (Cleanup: HIR ty lowering: Consolidate the places that do assoc item probing & access checking) - #125980 (Nvptx remove direct passmode) - #126187 (For E0277 suggest adding `Result` return type for function when using QuestionMark `?` in the body.) - #126210 (docs(core): make more const_ptr doctests assert instead of printing) - #126249 (Simplify `[T; N]::try_map` signature) - #126256 (Add {{target}} substitution to compiletest) - #126263 (Make issue-122805.rs big endian compatible) - #126281 (set_env: State the conclusion upfront) - #126286 (Make `storage-live.rs` robust against rustc internal changes.) - #126287 (Update a cranelift patch file for formatting changes.) - #126301 (Use `tidy` to sort crate attributes for all compiler crates.) - #126305 (Make PathBuf less Ok with adding UTF-16 then `into_string`) - #126310 (Migrate run make prefer rlib) - #126314 (fix RELEASES: we do not support upcasting to auto traits) r? `@ghost` `@rustbot` modify labels: rollup
2024-06-12Rollup merge of #126305 - ↵Jubilee-0/+3
workingjubilee:fix-os-string-to-string-utf8-invariant, r=joboet Make PathBuf less Ok with adding UTF-16 then `into_string` Fixes #126291 which is, as far as I can tell, a regression introduced by #96869. try-job: x86_64-msvc
2024-06-12Rollup merge of #126287 - nnethercote:reformat-cranelift-patch, r=bjorn3Jubilee-2/+2
Update a cranelift patch file for formatting changes. PR #125443 will reformat all the use declarations in the repo. This would break a patch kept in `rustc_codegen_cranelift` that gets applied to `library/std/src/sys/pal/windows/rand.rs`. So this commit formats the use declarations in `library/std/src/sys/pal/windows/rand.rs` in advance of #125443 and updates the patch file accordingly. The motivation is that #125443 is a huge change and we want to get fiddly little changes like this out of the way so it can be nothing more than an `x fmt --all`. r? ``@bjorn3``
2024-06-12Rollup merge of #126281 - ChrisDenton:env, r=jhprattJubilee-4/+8
set_env: State the conclusion upfront People tend to skim or skip over long explanations so we should be very upfront that `set_var` and `remove_var` are being made unsafe for a very good reason. This is just the conclusion restated almost verbatim but earlier in the docs and separated from the explanation: https://github.com/rust-lang/rust/blob/0c960618b56f662d933e8b864cd9632a99174e87/library/std/src/env.rs#L338-L339 I think this may help with people who may not be entirely comfortable with #125937 being rejected.
2024-06-12Require any function with a tait in its signature to actually constrain a ↵Oli Scherer-28/+32
hidden type
2024-06-12Make PathBuf less Ok with adding UTF-16 then `into_string`Jubilee Young-0/+3
2024-06-12Update a cranelift patch file for formatting changes.Nicholas Nethercote-2/+2
PR #125443 will reformat all the use declarations in the repo. This would break a patch kept in `rustc_codegen_cranelift` that gets applied to `library/std/src/sys/pal/windows/rand.rs`. So this commit formats the use declarations in `library/std/src/sys/pal/windows/rand.rs` in advance of #125443 and updates the patch file accordingly. The motivation is that #125443 is a huge change and we want to get fiddly little changes like this out of the way so it can be nothing more than an `x fmt --all`.
2024-06-11set_env: State the conclusion upfrontChris Denton-4/+8
2024-06-11Rename `std::fs::try_exists` to `std::fs::exists` and stabilize fs_try_existsEduardo Sánchez Muñoz-19/+18
2024-06-11Unify guarantees about the default allocatorTobias Bucher-1/+3
`std::alloc` said that the default allocator is unspecified for all crrate types except `cdylib` and `staticlib`. Adjust `std::alloc::System` documentation to say the same. Fixes #125870.
2024-06-11remove cfg(bootstrap)Pietro Albini-16/+0
2024-06-11replace version placeholderPietro Albini-14/+14
2024-06-11Formatting.Mara Bos-1/+3
2024-06-11Bump deprecation of std's PanicInfo alias to 1.82.0.Mara Bos-1/+1
2024-06-11Add PanicHookInfo::payload_as_str().Mara Bos-0/+39
2024-06-11Fix display of panic message in recursive panic.Mara Bos-9/+6
2024-06-11Add note on panic payload type.Mara Bos-0/+7
2024-06-11Downcast panic payload to String too in example.Mara Bos-0/+2
2024-06-11Move deprecation of std::panic::PanicInfo to 1.80.0.Mara Bos-1/+1
2024-06-11Rename std::panic::PanicInfo to PanicHookInfo.Mara Bos-23/+33
2024-06-11Reorder body of begin_panic for consistency.Mara Bos-17/+11
In the other functions, we put the struct and impl blocks first, such that the return expression can be at the end of the body as usual.
2024-06-11Impl Display for PanicPayload to simplify things.Mara Bos-9/+28
2024-06-11Use unnamed lifetimes for [..]Payload impl blocks.Mara Bos-7/+3
2024-06-11Move downcasting panic payload to str to a function.Mara Bos-7/+11
2024-06-11Mark some PanicInfo methods as #[inline] for consistency.Mara Bos-0/+3
2024-06-11Remove std::panic::PanicInfo::internal_constructor+set_payload.Mara Bos-21/+7
We can just set the payload immediately in the constructor, and the constructor does not need to be public.
2024-06-11Fix doc link.Mara Bos-3/+2
2024-06-11Document difference between core and std's PanicInfo.Mara Bos-2/+9
2024-06-11Split core's PanicInfo and std's PanicInfo.Mara Bos-22/+168
2024-06-10Bump windows-bindgen to 0.57Chris Denton-417/+66
2024-06-10Clarify `Command::new` behavior if passed programs with arguments许杰友 Jieyou Xu (Joe)-0/+19
2024-06-10fix: build on haikuSteve Lau-2/+2
2024-06-09Migrate more things to WinErrorChris Denton-30/+69
2024-06-09Rollup merge of #126168 - devnexen:current_exe_haiku_simpl, r=ChrisDentonMatthias Krüger-10/+10
std::unix::os current_exe implementation simplification for haiku. _get_net_image_info is a bit overkill as it allows to get broader informations about the process.
2024-06-09Rollup merge of #126146 - devnexen:signal_fbsd, r=ChrisDentonMatthias Krüger-0/+4
std::unix::process adding few specific freebsd signals to be able to id.
2024-06-08std::unix::os current_exe implementation simplification for haiku.David Carlier-10/+10
_get_net_image_info is a bit overkill as it allows to get broader informations about the process.
2024-06-08Auto merge of #125966 - schvv31n:impl_os_string_pathbuf_leak, r=workingjubileebors-0/+72
Implement `os_string_pathbuf_leak` implementation of #125965 ACP: https://github.com/rust-lang/libs-team/issues/389 [ Accepted ]
2024-06-08std::unix::process adding few specific freebsd signals to be able to id.David Carlier-0/+4
2024-06-08Rollup merge of #125998 - devnexen:get_mode_illumos, r=NilstriebLeón Orell Valerian Liehr-0/+4
std::unix::fs::get_mode implementation for illumos/solaris. they both support the F_GETFL fctnl flag/O_ACCMODE mask to get the file descriptor access modes.
2024-06-08Rollup merge of #125951 - slanterns:error_in_core_stabilization, r=AmanieuLeón Orell Valerian Liehr-1/+0
Stabilize `error_in_core` Closes: https://github.com/rust-lang/rust/issues/103765. `@rustbot` label: +T-libs-api r? libs-api
2024-06-07add HermitOS support of vectored read/write operationsStefan Lankes-91/+180
In general, the I/O interface of hermit-abi is more POSIX-like interface. Consequently, platform abstraction layer for HermitOS has slightly adjusted and some inaccuracies remove.
2024-06-07Rollup merge of #126030 - ChrisDenton:update-wingen-readme, r=Mark-SimulacrumMatthias Krüger-1/+1
Update `./x fmt` command in library/std/src/sys/pal/windows/c/README.md `./x fmt` no longer accepts paths so the command in the readme won't work.
2024-06-07Stabilize `error_in_core`Slanterns-1/+0
2024-06-06fixed memory leaks in PathBuf::leak & OsString::leak testsschvv31n-1/+6
2024-06-05Raise `DEFAULT_MIN_STACK_SIZE` to at least 64KiBJubilee Young-4/+4
Prevent copy-paste errors from producing new starved-for-resources threaded platforms by raising `DEFAULT_MIN_STACK_SIZE` from 4096 bytes to at least 64KiB. Two platforms "affected" by this have no actual threads: - UEFI - "unsupported" Platforms that this actually affects: - wasm32-wasi with "atomics" enabled - wasm32-wasi-p1-threads Two exceptions: - SGX: a "secure code execution" platform, stays at 4096B - TEEOS: also a "secure code execution" platform, stays at 8192B I believe either of these may have sufficiently "interesting" semantics around threads, or significant external library support. Either would mean making any choices here for them is suspect.
2024-06-05Auto merge of #126038 - matthiaskrgr:rollup-h4rm3x2, r=matthiaskrgrbors-17/+11
Rollup of 9 pull requests Successful merges: - #124840 (resolve: mark it undetermined if single import is not has any bindings) - #125622 (Winnow private method candidates instead of assuming any candidate of the right name will apply) - #125648 (Remove unused(?) `~/rustsrc` folder from docker script) - #125672 (Add more ABI test cases to miri (RFC 3391)) - #125800 (Fix `mut` static task queue in SGX target) - #125871 (Orphanck[old solver]: Consider opaque types to never cover type parameters) - #125893 (Handle all GVN binops in a single place.) - #126008 (Port `tests/run-make-fulldeps/issue-19371` to ui-fulldeps) - #126032 (Update description of the `IsTerminal` example) r? `@ghost` `@rustbot` modify labels: rollup