Skip to content

Commit 3abe7f1

Browse files
authored
chore(turbopack): Remove unused macro definition (#79521)
### What? Remove unused macro definition. ### Why? It's not used.
1 parent 3235c6f commit 3abe7f1

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

turbopack/crates/turbopack-ecmascript/src/code_gen.rs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -192,37 +192,6 @@ pub fn path_to(
192192
/// possible visit methods.
193193
#[macro_export]
194194
macro_rules! create_visitor {
195-
// This rule needs to be first, otherwise we run into the following error:
196-
// expected one of `!`, `)`, `,`, `.`, `::`, `?`, `{`, or an operator, found `:`
197-
// This is a regression on nightly.
198-
(visit_mut_program($arg:ident: &mut Program) $b:block) => {{
199-
struct Visitor<T: Fn(&mut swc_core::ecma::ast::Program) + Send + Sync> {
200-
visit_mut_program: T,
201-
}
202-
203-
impl<T: Fn(&mut swc_core::ecma::ast::Program) + Send + Sync> $crate::code_gen::VisitorFactory
204-
for Box<Visitor<T>>
205-
{
206-
fn create<'a>(&'a self) -> Box<dyn swc_core::ecma::visit::VisitMut + Send + Sync + 'a> {
207-
Box::new(&**self)
208-
}
209-
}
210-
211-
impl<'a, T: Fn(&mut swc_core::ecma::ast::Program) + Send + Sync> swc_core::ecma::visit::VisitMut
212-
for &'a Visitor<T>
213-
{
214-
fn visit_mut_program(&mut self, $arg: &mut swc_core::ecma::ast::Program) {
215-
(self.visit_mut_program)($arg);
216-
}
217-
}
218-
219-
(
220-
Vec::new(),
221-
Box::new(Box::new(Visitor {
222-
visit_mut_program: move |$arg: &mut swc_core::ecma::ast::Program| $b,
223-
})) as Box<dyn $crate::code_gen::VisitorFactory>,
224-
)
225-
}};
226195
(exact $ast_path:expr, $name:ident($arg:ident: &mut $ty:ident) $b:block) => {
227196
$crate::create_visitor!(__ $ast_path.to_vec(), $name($arg: &mut $ty) $b)
228197
};

0 commit comments

Comments
 (0)