diff --git a/crates/swc_common/src/eq.rs b/crates/swc_common/src/eq.rs index 694753f2c19e..8d569d720e58 100644 --- a/crates/swc_common/src/eq.rs +++ b/crates/swc_common/src/eq.rs @@ -1,7 +1,6 @@ use std::{cell::RefCell, rc::Rc, sync::Arc}; use num_bigint::BigInt; -use swc_allocator::nightly_only; use crate::{BytePos, Span}; @@ -64,20 +63,20 @@ where } } -nightly_only!( - impl EqIgnoreSpan for swc_allocator::vec::Vec - where - T: EqIgnoreSpan, - { - fn eq_ignore_span(&self, other: &Self) -> bool { - self.len() == other.len() - && self - .iter() - .zip(other.iter()) - .all(|(a, b)| a.eq_ignore_span(b)) - } - } -); +// nightly_only!( +// impl EqIgnoreSpan for swc_allocator::vec::Vec +// where +// T: EqIgnoreSpan, +// { +// fn eq_ignore_span(&self, other: &Self) -> bool { +// self.len() == other.len() +// && self +// .iter() +// .zip(other.iter()) +// .all(|(a, b)| a.eq_ignore_span(b)) +// } +// } +// ); /// Derive with `#[derive(TypeEq)]`. pub trait TypeEq { @@ -188,27 +187,27 @@ macro_rules! deref { deref!(Box, Rc, Arc); -swc_allocator::nightly_only!( - impl EqIgnoreSpan for swc_allocator::boxed::Box - where - N: EqIgnoreSpan, - { - #[inline] - fn eq_ignore_span(&self, other: &Self) -> bool { - (**self).eq_ignore_span(&**other) - } - } - - impl TypeEq for swc_allocator::boxed::Box - where - N: TypeEq, - { - #[inline] - fn type_eq(&self, other: &Self) -> bool { - (**self).type_eq(&**other) - } - } -); +// swc_allocator::nightly_only!( +// impl EqIgnoreSpan for swc_allocator::boxed::Box +// where +// N: EqIgnoreSpan, +// { +// #[inline] +// fn eq_ignore_span(&self, other: &Self) -> bool { +// (**self).eq_ignore_span(&**other) +// } +// } + +// impl TypeEq for swc_allocator::boxed::Box +// where +// N: TypeEq, +// { +// #[inline] +// fn type_eq(&self, other: &Self) -> bool { +// (**self).type_eq(&**other) +// } +// } +// ); impl EqIgnoreSpan for &N where diff --git a/crates/swc_common/src/pos.rs b/crates/swc_common/src/pos.rs index bbdd242fabff..3934d8122ee9 100644 --- a/crates/swc_common/src/pos.rs +++ b/crates/swc_common/src/pos.rs @@ -191,13 +191,13 @@ where } } -swc_allocator::nightly_only!( - impl Spanned for swc_allocator::boxed::Box - where - T: Spanned, - { - fn span(&self) -> Span { - self.as_ref().span() - } - } -); +// swc_allocator::nightly_only!( +// impl Spanned for swc_allocator::boxed::Box +// where +// T: Spanned, +// { +// fn span(&self) -> Span { +// self.as_ref().span() +// } +// } +// ); diff --git a/crates/swc_common/src/util/take.rs b/crates/swc_common/src/util/take.rs index 38c16ea196cb..20906995569b 100644 --- a/crates/swc_common/src/util/take.rs +++ b/crates/swc_common/src/util/take.rs @@ -55,19 +55,19 @@ impl Take for Span { } } -swc_allocator::nightly_only!( - impl Take for swc_allocator::boxed::Box - where - T: Take, - { - fn dummy() -> Self { - swc_allocator::boxed::Box::new(T::dummy()) - } - } +// swc_allocator::nightly_only!( +// impl Take for swc_allocator::boxed::Box +// where +// T: Take, +// { +// fn dummy() -> Self { +// swc_allocator::boxed::Box::new(T::dummy()) +// } +// } - impl Take for swc_allocator::vec::Vec { - fn dummy() -> Self { - Default::default() - } - } -); +// impl Take for swc_allocator::vec::Vec { +// fn dummy() -> Self { +// Default::default() +// } +// } +// );