about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-10-16 14:20:25 +0000
committerbors <bors@rust-lang.org>2015-10-16 14:20:25 +0000
commit24228fee15dec0b2cb620b33a24cf1b07549c88a (patch)
treeef745b3c71cf0e109e1a945ea22def03f7c70381
parent05cfd72ed1934c92af08dbcb66fd1af6b1298721 (diff)
parente7be2c3e99d3bf7287906c4c35c6822784924b10 (diff)
Auto merge of #29020 - goyox86:goyox86/rustfmting-libarena, r=nrc
Hi Rustaceans!

This is the result of running latest rustfmt on libarena!

//cc @nrc 
-rw-r--r--src/libarena/lib.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/libarena/lib.rs b/src/libarena/lib.rs
index 97621a2ac89..5bc1c44e1b1 100644
--- a/src/libarena/lib.rs
+++ b/src/libarena/lib.rs
@@ -245,7 +245,9 @@ impl<'longer_than_self> Arena<'longer_than_self> {
     }
 
     #[inline]
-    fn alloc_copy<T, F>(&self, op: F) -> &mut T where F: FnOnce() -> T {
+    fn alloc_copy<T, F>(&self, op: F) -> &mut T
+        where F: FnOnce() -> T
+    {
         unsafe {
             let ptr = self.alloc_copy_inner(mem::size_of::<T>(), mem::align_of::<T>());
             let ptr = ptr as *mut T;
@@ -296,7 +298,9 @@ impl<'longer_than_self> Arena<'longer_than_self> {
     }
 
     #[inline]
-    fn alloc_noncopy<T, F>(&self, op: F) -> &mut T where F: FnOnce() -> T {
+    fn alloc_noncopy<T, F>(&self, op: F) -> &mut T
+        where F: FnOnce() -> T
+    {
         unsafe {
             let tydesc = get_tydesc::<T>();
             let (ty_ptr, ptr) = self.alloc_noncopy_inner(mem::size_of::<T>(), mem::align_of::<T>());
@@ -318,7 +322,9 @@ impl<'longer_than_self> Arena<'longer_than_self> {
     /// Allocates a new item in the arena, using `op` to initialize the value,
     /// and returns a reference to it.
     #[inline]
-    pub fn alloc<T:'longer_than_self, F>(&self, op: F) -> &mut T where F: FnOnce() -> T {
+    pub fn alloc<T: 'longer_than_self, F>(&self, op: F) -> &mut T
+        where F: FnOnce() -> T
+    {
         unsafe {
             if intrinsics::needs_drop::<T>() {
                 self.alloc_noncopy(op)