diff options
| author | Ryan Levick <ryan.levick@gmail.com> | 2020-08-10 17:39:06 +0200 |
|---|---|---|
| committer | Ryan Levick <ryan.levick@gmail.com> | 2020-08-10 17:39:06 +0200 |
| commit | 6778baf516cf00d6ba2d3f448aa312b4ac2e43b5 (patch) | |
| tree | 7facafd42129cd8bc9613b2885645b8734d2bb14 /library/std/src/sys | |
| parent | 57572cf8096ccb332370f7a711641a061bfd7434 (diff) | |
| download | rust-6778baf516cf00d6ba2d3f448aa312b4ac2e43b5.tar.gz rust-6778baf516cf00d6ba2d3f448aa312b4ac2e43b5.zip | |
Fix up docs
Diffstat (limited to 'library/std/src/sys')
| -rw-r--r-- | library/std/src/sys/windows/mod.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/library/std/src/sys/windows/mod.rs b/library/std/src/sys/windows/mod.rs index 982ec912c44..4334447b8b1 100644 --- a/library/std/src/sys/windows/mod.rs +++ b/library/std/src/sys/windows/mod.rs @@ -281,7 +281,11 @@ macro_rules! impl_is_zero { impl_is_zero! { i8 i16 i32 i64 isize u8 u16 u32 u64 usize } pub fn cvt<I: IsZero>(i: I) -> crate::io::Result<I> { - if i.is_zero() { Err(crate::io::Error::last_os_error()) } else { Ok(i) } + if i.is_zero() { + Err(crate::io::Error::last_os_error()) + } else { + Ok(i) + } } pub fn dur2timeout(dur: Duration) -> c::DWORD { @@ -300,14 +304,10 @@ pub fn dur2timeout(dur: Duration) -> c::DWORD { .unwrap_or(c::INFINITE) } -// On Windows, use the processor-specific __fastfail mechanism. In Windows 8 -// and later, this will terminate the process immediately without running any -// in-process exception handlers. In earlier versions of Windows, this -// sequence of instructions will be treated as an access violation, -// terminating the process but without necessarily bypassing all exception -// handlers. -// -// https://docs.microsoft.com/en-us/cpp/intrinsics/fastfail +/// Use `__fastfail` to abort the process +/// +/// This is the same implementation as in libpanic_abort's `__rust_start_panic`. See +/// that function for more information on `__fastfail` #[allow(unreachable_code)] pub fn abort_internal() -> ! { #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] |
