- 21 6月, 2022 2 次提交
-
-
由 Mara Bos 提交于
-
由 Josh Triplett 提交于
-
- 20 6月, 2022 3 次提交
-
-
由 Chris Denton 提交于
-
由 Chris Denton 提交于
-
由 nils 提交于
It's a map, not a vector.
-
- 18 6月, 2022 2 次提交
-
-
由 Ralf Jung 提交于
-
由 Aria Beingessner 提交于
This allows things like `Result<ExitCode, E>` to 'just work'
-
- 16 6月, 2022 6 次提交
-
-
由 Maybe Waffle 提交于
-
由 Maybe Waffle 提交于
-
由 pierwill 提交于
-
由 Xuanwo 提交于
Signed-off-by: NXuanwo <github@xuanwo.io>
-
由 Josh Stone 提交于
The important methods like `read` and `write` were already inlined, which can propagate all the way to inlining in user code, but these small state functions were left behind as normal calls. They should almost always be inlined as well, as they're just a few instructions.
-
由 Dan Gohman 提交于
-
- 15 6月, 2022 8 次提交
-
-
由 Dan Gohman 提交于
On Unix, describe these in terms of the underlying "file description". On Windows, describe them in terms of the underlying "object".
-
由 Dan Gohman 提交于
And `BorrowedHandle::try_clone_to_owned` and `BorrowedSocket::try_clone_to_owned` on Windows.
-
由 Dan Gohman 提交于
-
由 Frank Steffahn 提交于
-
由 KarlWithK 提交于
Updated the HashMap's documentation to include two references to add_modify. The first is when the `Entry` API is mentioned at the beginning. I was hesitant to change the "attack" example (although I believe that it is perfect example of where `add_modify` should be used) because both uses work equally, but one is more idiomatic (`add_modify`). The second is with the `entry` function that is used for the `Entry` API. The code example was a perfect use for `add_modify`, which is why it was changed to reflect that.
-
由 Dan Gohman 提交于
-
由 Dan Gohman 提交于
Implement stabilization of [I/O safety], aka `#[feature(io_safety)]`. Fixes #87074. [I/O safety]: https://github.com/rust-lang/rfcs/blob/master/text/3128-io-safety.md
-
由 Michael Howell 提交于
-
- 14 6月, 2022 10 次提交
-
-
由 Martin Habovstiak 提交于
This stabilizes the `Path::try_exists()` method which returns `Result<bool, io::Error>` instead of `bool` allowing handling of errors unrelated to the file not existing. (e.g permission errors) Along with the stabilization it also: * Warns that the `exists()` method is error-prone and suggests to use the newly stabilized one. * Suggests it instead of `metadata()` to handle errors. * Mentions TOCTOU bugs to avoid false assumption that `try_exists()` is completely safe fixed version of `exists()`. * Renames the feature of still-unstable `std::fs::try_exists()` to `fs_try_exists` to avoid name conflict. The tracking issue #83186 remains open to track `fs_try_exists`.
-
由 Mark Drobnak 提交于
I checked with t-libs to make sure this is OK to do on stable functions: https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/Replacing.20std.20function.20arg.20type.20with.20private.20type.20def.3F
-
由 Ian Chamberlain 提交于
Always use fallback thread_local destructor, since __cxa_thread_atexit_impl is never defined on the target. See https://github.com/AzureMarker/rust-horizon/pull/2
-
-
-
由 AzureMarker 提交于
Our condvar doesn't support setting attributes, like pthread_condattr_setclock, which the current wait_timeout expects to have configured. Switch to a different implementation, following espidf.
-
-
由 Meziu 提交于
Co-authored-by: NIan Chamberlain <ian.h.chamberlain@gmail.com> Co-authored-by: NMark Drobnak <mark.drobnak@gmail.com>
-
由 DrMeepster 提交于
-
由 Eduard-Mihai Burtescu 提交于
-
- 13 6月, 2022 1 次提交
-
-
由 Takayuki Maeda 提交于
-
- 12 6月, 2022 6 次提交
-
-
由 Michael Howell 提交于
Co-authored-by: NJacob Hoffman-Andrews <github@hoffman-andrews.com>
-
由 DrMeepster 提交于
-
由 Michael Howell 提交于
-
由 Michael Howell 提交于
-
由 Michael Howell 提交于
Co-authored-by: NJacob Hoffman-Andrews <github@hoffman-andrews.com>
-
由 Michael Howell 提交于
-
- 11 6月, 2022 2 次提交
-
-
由 Mara Bos 提交于
-
由 David Tolnay 提交于
Repro: #![feature(backtrace)] use std::backtrace::Backtrace; use std::io::{self, Write as _}; use std::panic::{self, PanicInfo}; #[derive(Debug)] pub struct Error; fn panic_hook(panic_info: &PanicInfo) { let backtrace = Backtrace::force_capture(); let _ = write!(io::stdout(), "{}\n{}", panic_info, backtrace); } fn main() -> Result<(), Error> { panic::set_hook(Box::new(panic_hook)); let stderr = io::stderr(); let mut stderr = stderr.lock(); while stderr.write_all(b".\n").is_ok() {} Err(Error) } Before: $ RUST_BACKTRACE=1 target/debug/testing 3>&2 2>&1 1>&3 | head . . . . . . . . . . panicked at 'failed printing to stderr: Broken pipe (os error 32)', library/std/src/io/stdio.rs:1016:9 0: testing::panic_hook at ./src/main.rs:11:21 1: core::ops::function::Fn::call at /git/rust/library/core/src/ops/function.rs:77:5 2: std::panicking::rust_panic_with_hook 3: std::panicking::begin_panic_handler::{{closure}} 4: std::sys_common::backtrace::__rust_end_short_backtrace 5: rust_begin_unwind 6: core::panicking::panic_fmt 7: std::io::stdio::_eprint 8: <core::result::Result<!,E> as std::process::Termination>::report at /git/rust/library/std/src/process.rs:2164:9 9: <core::result::Result<(),E> as std::process::Termination>::report at /git/rust/library/std/src/process.rs:2148:25 10: std::rt::lang_start::{{closure}} at /git/rust/library/std/src/rt.rs:145:18 11: std::rt::lang_start_internal 12: std::rt::lang_start at /git/rust/library/std/src/rt.rs:144:17 13: main 14: __libc_start_main at /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16 15: _start After: $ RUST_BACKTRACE=1 target/debug/testing 3>&2 2>&1 1>&3 | head . . . . . . . . . .
-