diff --git a/crates/oxc_transformer/src/common/helper_loader.rs b/crates/oxc_transformer/src/common/helper_loader.rs index 716922351..326abe260 100644 --- a/crates/oxc_transformer/src/common/helper_loader.rs +++ b/crates/oxc_transformer/src/common/helper_loader.rs @@ -70,7 +70,7 @@ use std::{borrow::Cow, cell::RefCell}; use rustc_hash::FxHashMap; use serde::Deserialize; -use oxc_allocator::{String as AString, Vec}; +use oxc_allocator::{String as ArenaString, Vec}; use oxc_ast::ast::{Argument, CallExpression, Expression, TSTypeParameterInstantiation}; use oxc_semantic::{ReferenceFlags, SymbolFlags}; use oxc_span::{Atom, SPAN}; @@ -247,7 +247,7 @@ impl<'a> HelperLoaderStore<'a> { // Construct string directly in arena without an intermediate temp allocation let len = self.module_name.len() + "/helpers/".len() + helper_name.len(); - let mut source = AString::with_capacity_in(len, ctx.ast.allocator); + let mut source = ArenaString::with_capacity_in(len, ctx.ast.allocator); source.push_str(&self.module_name); source.push_str("/helpers/"); source.push_str(helper_name); diff --git a/crates/oxc_transformer/src/es2022/class_static_block.rs b/crates/oxc_transformer/src/es2022/class_static_block.rs index 8f637a61f..233df0d48 100644 --- a/crates/oxc_transformer/src/es2022/class_static_block.rs +++ b/crates/oxc_transformer/src/es2022/class_static_block.rs @@ -41,7 +41,7 @@ use itoa::Buffer as ItoaBuffer; -use oxc_allocator::String as AString; +use oxc_allocator::String as ArenaString; use oxc_ast::{ast::*, Visit, NONE}; use oxc_semantic::SymbolTable; use oxc_span::SPAN; @@ -295,7 +295,7 @@ impl<'a> Keys<'a> { i += 1; } - let mut key = AString::with_capacity_in(num_str.len() + 1, ctx.ast.allocator); + let mut key = ArenaString::with_capacity_in(num_str.len() + 1, ctx.ast.allocator); key.push('_'); key.push_str(num_str); let key = Atom::from(key.into_bump_str());