You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: crates/oxc_allocator/src/boxed.rs
+8-9
Original file line number
Diff line number
Diff line change
@@ -2,16 +2,15 @@
2
2
//!
3
3
//! Originally based on [jsparagus](https://github.com/mozilla-spidermonkey/jsparagus/blob/24004745a8ed4939fc0dc7332bfd1268ac52285f/crates/ast/src/arena.rs)
4
4
5
-
use std::{
6
-
self,
5
+
use core::{
7
6
fmt::{self,Debug,Formatter},
8
7
hash::{Hash,Hasher},
9
8
marker::PhantomData,
10
9
ops::{self,Deref},
11
10
ptr::{self,NonNull},
12
11
};
13
12
14
-
#[cfg(any(feature = "serialize", test))]
13
+
#[cfg(all(feature = "serialize", test))]
15
14
use oxc_estree::{ESTree,SerializerasESTreeSerializer};
16
15
#[cfg(any(feature = "serialize", test))]
17
16
use serde::{Serialize,SerializerasSerdeSerializer};
@@ -36,7 +35,7 @@ impl<T: ?Sized> Box<'_, T> {
36
35
/// Const assertion that `T` is not `Drop`.
37
36
/// Must be referenced in all methods which create a `Box`.
38
37
constASSERT_T_IS_NOT_DROP:() =
39
-
assert!(!std::mem::needs_drop::<T>(),"Cannot create a Box<T> where T is a Drop type");
38
+
assert!(!core::mem::needs_drop::<T>(),"Cannot create a Box<T> where T is a Drop type");
0 commit comments