Skip to content

Commit d77c19b

Browse files
committed
liny
1 parent 8dbc61a commit d77c19b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2803
-751
lines changed

crates/swc_ecma_compiler/src/compat/common/helper_loader.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@
6464
//! SWC version directly generates import statements or member expressions as
6565
//! needed.
6666
67+
#![allow(dead_code)]
68+
6769
use std::borrow::Cow;
6870

6971
use rustc_hash::FxHashMap;

crates/swc_ecma_compiler/src/compat/common/module_imports.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
//! Based on `@babel/helper-module-imports`
3333
//! <https://github.com/nicolo-ribaudo/babel/tree/v7.25.8/packages/babel-helper-module-imports>
3434
35+
#![allow(dead_code)]
36+
3537
use std::cell::RefCell;
3638

3739
use indexmap::{map::Entry as IndexMapEntry, IndexMap};

crates/swc_ecma_compiler/src/compat/common/top_level_statements.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
//! The OXC version uses `TransformCtx` and the `Traverse` pattern.
1212
//! This SWC version adapts the functionality to work with SWC's architecture.
1313
14+
#![allow(dead_code)]
15+
1416
use std::cell::RefCell;
1517

1618
use swc_ecma_ast::*;

crates/swc_ecma_compiler/src/compat/common/var_declarations.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
//! self.var_declarations.insert_let(&binding_ident2, Some(init_expr));
2222
//! ```
2323
24+
#![allow(dead_code)]
25+
2426
use std::cell::RefCell;
2527

2628
use swc_common::DUMMY_SP;
@@ -270,7 +272,7 @@ fn create_uid_binding(name: &str, _ctx: &TransformCtx) -> BindingIdent {
270272

271273
// Simple UID generation - in production this should check for conflicts
272274
let uid_name = if name.starts_with('_') {
273-
Atom::from(format!("{name}"))
275+
Atom::from(name.to_string())
274276
} else {
275277
Atom::from(format!("_{name}"))
276278
};

0 commit comments

Comments
 (0)