Skip to content

Commit 95cbd48

Browse files
committed
Move to new box syntax
This fixes a build error on new Rust nightly <lazy_static macros>:14:56: 14:74 error: box expression syntax is experimental; you can call `Box::new` instead. <lazy_static macros>:14 __static = transmute:: < Box < $ T > , * const $ T > ( box ( ) ( $ e ) ) ; }
1 parent b48b0c5 commit 95cbd48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lazy_static.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ macro_rules! lazy_static {
9393
static mut __static: *const $T = 0 as *const $T;
9494
static mut __ONCE: Once = ONCE_INIT;
9595
__ONCE.call_once(|| {
96-
__static = transmute::<Box<$T>, *const $T>(box() ($e));
96+
__static = transmute::<Box<$T>, *const $T>(Box::new(($e)));
9797
});
9898
let static_ref = &*__static;
9999
require_sync(static_ref);

0 commit comments

Comments
 (0)