@@ -245,7 +245,9 @@ impl<'longer_than_self> Arena<'longer_than_self> {
245
245
}
246
246
247
247
#[ inline]
248
- fn alloc_copy < T , F > ( & self , op : F ) -> & mut T where F : FnOnce ( ) -> T {
248
+ fn alloc_copy < T , F > ( & self , op : F ) -> & mut T
249
+ where F : FnOnce ( ) -> T
250
+ {
249
251
unsafe {
250
252
let ptr = self . alloc_copy_inner ( mem:: size_of :: < T > ( ) , mem:: align_of :: < T > ( ) ) ;
251
253
let ptr = ptr as * mut T ;
@@ -296,7 +298,9 @@ impl<'longer_than_self> Arena<'longer_than_self> {
296
298
}
297
299
298
300
#[ inline]
299
- fn alloc_noncopy < T , F > ( & self , op : F ) -> & mut T where F : FnOnce ( ) -> T {
301
+ fn alloc_noncopy < T , F > ( & self , op : F ) -> & mut T
302
+ where F : FnOnce ( ) -> T
303
+ {
300
304
unsafe {
301
305
let tydesc = get_tydesc :: < T > ( ) ;
302
306
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> {
318
322
/// Allocates a new item in the arena, using `op` to initialize the value,
319
323
/// and returns a reference to it.
320
324
#[ inline]
321
- pub fn alloc < T : ' longer_than_self , F > ( & self , op : F ) -> & mut T where F : FnOnce ( ) -> T {
325
+ pub fn alloc < T : ' longer_than_self , F > ( & self , op : F ) -> & mut T
326
+ where F : FnOnce ( ) -> T
327
+ {
322
328
unsafe {
323
329
if intrinsics:: needs_drop :: < T > ( ) {
324
330
self . alloc_noncopy ( op)
0 commit comments