about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/liballoc/collections/vec_deque.rs2
-rw-r--r--src/liballoc/str.rs2
-rw-r--r--src/liballoc/sync.rs2
-rw-r--r--src/libpanic_unwind/gcc.rs12
-rw-r--r--src/libpanic_unwind/seh64_gnu.rs2
-rw-r--r--src/libstd/panicking.rs2
-rw-r--r--src/libstd/sys/unix/rand.rs2
-rw-r--r--src/libstd/sys/windows/handle.rs2
-rw-r--r--src/libstd/sys/windows/mutex.rs2
-rw-r--r--src/libstd/sys/windows/process.rs2
-rw-r--r--src/libstd/sys/windows/rand.rs2
-rw-r--r--src/libstd/sys/windows/thread_local.rs2
-rw-r--r--src/libstd/sys/windows/time.rs4
-rw-r--r--src/libtest/bench.rs4
-rw-r--r--src/libtest/cli.rs2
-rw-r--r--src/libtest/console.rs2
16 files changed, 23 insertions, 23 deletions
diff --git a/src/liballoc/collections/vec_deque.rs b/src/liballoc/collections/vec_deque.rs
index 0bf573f5e25..8f3dfabd888 100644
--- a/src/liballoc/collections/vec_deque.rs
+++ b/src/liballoc/collections/vec_deque.rs
@@ -1817,7 +1817,7 @@ impl<T> VecDeque<T> {
             }
         }
 
-        return elem;
+        elem
     }
 
     /// Splits the `VecDeque` into two at the given index.
diff --git a/src/liballoc/str.rs b/src/liballoc/str.rs
index 9231c2d3f1d..83816d8b954 100644
--- a/src/liballoc/str.rs
+++ b/src/liballoc/str.rs
@@ -456,7 +456,7 @@ impl str {
                 }
             }
         }
-        return s;
+        s
     }
 
     /// Converts a [`Box<str>`] into a [`String`] without copying or allocating.
diff --git a/src/liballoc/sync.rs b/src/liballoc/sync.rs
index 69f8f71197c..80d6c6e0d43 100644
--- a/src/liballoc/sync.rs
+++ b/src/liballoc/sync.rs
@@ -1638,7 +1638,7 @@ impl<T: ?Sized> Clone for Weak<T> {
             }
         }
 
-        return Weak { ptr: self.ptr };
+        Weak { ptr: self.ptr }
     }
 }
 
diff --git a/src/libpanic_unwind/gcc.rs b/src/libpanic_unwind/gcc.rs
index 236ed150505..a35847c85fc 100644
--- a/src/libpanic_unwind/gcc.rs
+++ b/src/libpanic_unwind/gcc.rs
@@ -156,21 +156,21 @@ unsafe extern "C" fn rust_eh_personality(version: c_int,
     if actions as i32 & uw::_UA_SEARCH_PHASE as i32 != 0 {
         match eh_action {
             EHAction::None |
-            EHAction::Cleanup(_) => return uw::_URC_CONTINUE_UNWIND,
-            EHAction::Catch(_) => return uw::_URC_HANDLER_FOUND,
-            EHAction::Terminate => return uw::_URC_FATAL_PHASE1_ERROR,
+            EHAction::Cleanup(_) => uw::_URC_CONTINUE_UNWIND,
+            EHAction::Catch(_) => uw::_URC_HANDLER_FOUND,
+            EHAction::Terminate => uw::_URC_FATAL_PHASE1_ERROR,
         }
     } else {
         match eh_action {
-            EHAction::None => return uw::_URC_CONTINUE_UNWIND,
+            EHAction::None => uw::_URC_CONTINUE_UNWIND,
             EHAction::Cleanup(lpad) |
             EHAction::Catch(lpad) => {
                 uw::_Unwind_SetGR(context, UNWIND_DATA_REG.0, exception_object as uintptr_t);
                 uw::_Unwind_SetGR(context, UNWIND_DATA_REG.1, 0);
                 uw::_Unwind_SetIP(context, lpad);
-                return uw::_URC_INSTALL_CONTEXT;
+                uw::_URC_INSTALL_CONTEXT
             }
-            EHAction::Terminate => return uw::_URC_FATAL_PHASE2_ERROR,
+            EHAction::Terminate => uw::_URC_FATAL_PHASE2_ERROR,
         }
     }
 }
diff --git a/src/libpanic_unwind/seh64_gnu.rs b/src/libpanic_unwind/seh64_gnu.rs
index 457ffcd34f9..16b699a4437 100644
--- a/src/libpanic_unwind/seh64_gnu.rs
+++ b/src/libpanic_unwind/seh64_gnu.rs
@@ -46,7 +46,7 @@ pub fn payload() -> *mut u8 {
 
 pub unsafe fn cleanup(ptr: *mut u8) -> Box<dyn Any + Send> {
     let panic_ctx = Box::from_raw(ptr as *mut PanicData);
-    return panic_ctx.data;
+    panic_ctx.data
 }
 
 // SEH doesn't support resuming unwinds after calling a landing pad like
diff --git a/src/libstd/panicking.rs b/src/libstd/panicking.rs
index 2dde81bb0ec..619b1820190 100644
--- a/src/libstd/panicking.rs
+++ b/src/libstd/panicking.rs
@@ -217,7 +217,7 @@ pub fn update_panic_count(amt: isize) -> usize {
     PANIC_COUNT.with(|c| {
         let next = (c.get() as isize + amt) as usize;
         c.set(next);
-        return next
+        next
     })
 }
 
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..61393680883 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)),
                 }
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
         }
     }
 
diff --git a/src/libtest/bench.rs b/src/libtest/bench.rs
index c142c5213d2..c86bfd16c21 100644
--- a/src/libtest/bench.rs
+++ b/src/libtest/bench.rs
@@ -48,7 +48,7 @@ impl Bencher {
         F: FnMut(&mut Bencher),
     {
         f(self);
-        return self.summary;
+        self.summary
     }
 }
 
@@ -116,7 +116,7 @@ where
     for _ in 0..k {
         black_box(inner());
     }
-    return ns_from_dur(start.elapsed());
+    ns_from_dur(start.elapsed())
 }
 
 pub fn iter<T, F>(inner: &mut F) -> stats::Summary
diff --git a/src/libtest/cli.rs b/src/libtest/cli.rs
index f95d5aad18a..a34426305be 100644
--- a/src/libtest/cli.rs
+++ b/src/libtest/cli.rs
@@ -149,7 +149,7 @@ fn optgroups() -> getopts::Options {
             `CRITICAL_TIME` here means the limit that should not be exceeded by test.
             "
         );
-    return opts;
+    opts
 }
 
 fn usage(binary: &str, options: &getopts::Options) {
diff --git a/src/libtest/console.rs b/src/libtest/console.rs
index e17030726ce..244cbd2cf5f 100644
--- a/src/libtest/console.rs
+++ b/src/libtest/console.rs
@@ -296,7 +296,7 @@ pub fn run_tests_console(opts: &TestOpts, tests: Vec<TestDescAndFn>) -> io::Resu
 
     assert!(st.current_test_count() == st.total);
 
-    return out.write_run_finish(&st);
+    out.write_run_finish(&st)
 }
 
 // Calculates padding for given test description.