diff options
| author | bors <bors@rust-lang.org> | 2019-10-24 03:38:57 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-10-24 03:38:57 +0000 |
| commit | 55e00631e5bc5b16d40232914e57deeea197a8e4 (patch) | |
| tree | aa2b50a73237dd118df3faef760be2bf3dd7723f /src/libstd/sys | |
| parent | 4a8c5b20c7772bc5342b83d4b0696ea216ef75a7 (diff) | |
| parent | 3cd7a1740692ec34825d916550141b299caf458b (diff) | |
| download | rust-55e00631e5bc5b16d40232914e57deeea197a8e4.tar.gz rust-55e00631e5bc5b16d40232914e57deeea197a8e4.zip | |
Auto merge of #65733 - Centril:rollup-0zth66f, r=Centril
Rollup of 12 pull requests
Successful merges:
- #64178 (More Clippy fixes for alloc, core and std)
- #65144 (Add Cow::is_borrowed and Cow::is_owned)
- #65193 (Lockless LintStore)
- #65479 (Add the `matches!( $expr, $pat ) -> bool` macro)
- #65518 (Avoid ICE when checking `Destination` of `break` inside a closure)
- #65583 (rustc_metadata: use a table for super_predicates, fn_sig, impl_trait_ref.)
- #65641 (Derive `Rustc{En,De}codable` for `TokenStream`.)
- #65648 (Eliminate `intersect_opt`.)
- #65657 (Remove `InternedString`)
- #65691 (Update E0659 error code long explanation to 2018 edition)
- #65696 (Fix an issue with const inference variables sticking around under Chalk + NLL)
- #65704 (relax ExactSizeIterator bound on write_bytes)
Failed merges:
r? @ghost
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/unix/rand.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/windows/handle.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/windows/mutex.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/windows/process.rs | 5 | ||||
| -rw-r--r-- | src/libstd/sys/windows/rand.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/windows/thread_local.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/windows/time.rs | 4 |
7 files changed, 9 insertions, 10 deletions
diff --git a/src/libstd/sys/unix/rand.rs b/src/libstd/sys/unix/rand.rs index c5be1763302..be112f6fc03 100644 --- a/src/libstd/sys/unix/rand.rs +++ b/src/libstd/sys/unix/rand.rs @@ -8,7 +8,7 @@ pub fn hashmap_random_keys() -> (u64, u64) { mem::size_of_val(&v)); imp::fill_bytes(view); } - return v + v } #[cfg(all(unix, diff --git a/src/libstd/sys/windows/handle.rs b/src/libstd/sys/windows/handle.rs index 3e5aa693354..3986cda1a50 100644 --- a/src/libstd/sys/windows/handle.rs +++ b/src/libstd/sys/windows/handle.rs @@ -46,7 +46,7 @@ impl Handle { pub fn into_raw(self) -> c::HANDLE { let ret = self.raw(); mem::forget(self); - return ret; + ret } } diff --git a/src/libstd/sys/windows/mutex.rs b/src/libstd/sys/windows/mutex.rs index 37cbdcefced..79dec1adf4b 100644 --- a/src/libstd/sys/windows/mutex.rs +++ b/src/libstd/sys/windows/mutex.rs @@ -144,7 +144,7 @@ fn kind() -> Kind { Some(..) => Kind::SRWLock, }; KIND.store(ret as usize, Ordering::SeqCst); - return ret; + ret } pub struct ReentrantMutex { inner: UnsafeCell<MaybeUninit<c::CRITICAL_SECTION>> } diff --git a/src/libstd/sys/windows/process.rs b/src/libstd/sys/windows/process.rs index 8658deb8546..096b7bea8a5 100644 --- a/src/libstd/sys/windows/process.rs +++ b/src/libstd/sys/windows/process.rs @@ -257,7 +257,7 @@ impl Stdio { let ret = io.duplicate(0, true, c::DUPLICATE_SAME_ACCESS); io.into_raw(); - return ret + ret } Err(..) => Ok(Handle::new(c::INVALID_HANDLE_VALUE)), } @@ -472,9 +472,8 @@ fn make_command_line(prog: &OsStr, args: &[OsString]) -> io::Result<Vec<u16>> { cmd.push('"' as u16); } - let mut iter = arg.encode_wide(); let mut backslashes: usize = 0; - while let Some(x) = iter.next() { + for x in arg.encode_wide() { if x == '\\' as u16 { backslashes += 1; } else { diff --git a/src/libstd/sys/windows/rand.rs b/src/libstd/sys/windows/rand.rs index c9bcb5d7415..993831bec18 100644 --- a/src/libstd/sys/windows/rand.rs +++ b/src/libstd/sys/windows/rand.rs @@ -13,7 +13,7 @@ pub fn hashmap_random_keys() -> (u64, u64) { panic!("couldn't generate random bytes: {}", io::Error::last_os_error()); } - return v + v } #[cfg(target_vendor = "uwp")] diff --git a/src/libstd/sys/windows/thread_local.rs b/src/libstd/sys/windows/thread_local.rs index 4c9734fa0aa..728257cdd4b 100644 --- a/src/libstd/sys/windows/thread_local.rs +++ b/src/libstd/sys/windows/thread_local.rs @@ -52,7 +52,7 @@ pub unsafe fn create(dtor: Option<Dtor>) -> Key { if let Some(f) = dtor { register_dtor(key, f); } - return key; + key } #[inline] diff --git a/src/libstd/sys/windows/time.rs b/src/libstd/sys/windows/time.rs index e0f0e3a1a45..bd533c93d43 100644 --- a/src/libstd/sys/windows/time.rs +++ b/src/libstd/sys/windows/time.rs @@ -80,7 +80,7 @@ impl SystemTime { unsafe { let mut t: SystemTime = mem::zeroed(); c::GetSystemTimeAsFileTime(&mut t.t); - return t + t } } @@ -228,7 +228,7 @@ mod perf_counter { FREQUENCY = frequency; STATE.store(2, SeqCst); } - return frequency; + frequency } } |
