Skip to content

Commit 25b5d03

Browse files
authored
fix: update allocator args for oxc_allocator 0.138 API change in tests
1 parent e8d7deb commit 25b5d03

129 files changed

Lines changed: 4699 additions & 4699 deletions

File tree

Some content is hidden

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

‎crates/oxc_angular_compiler/src/ast/expression.rs‎

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -193,24 +193,24 @@ impl<'a> AngularExpression<'a> {
193193
match self {
194194
Self::Empty(e) => Self::Empty(Box::new_in(
195195
EmptyExpr { span: e.span, source_span: e.source_span },
196-
alloc,
196+
&alloc,
197197
)),
198198
Self::ImplicitReceiver(e) => Self::ImplicitReceiver(Box::new_in(
199199
ImplicitReceiver { span: e.span, source_span: e.source_span },
200-
alloc,
200+
&alloc,
201201
)),
202202
Self::ThisReceiver(e) => Self::ThisReceiver(Box::new_in(
203203
ThisReceiver { span: e.span, source_span: e.source_span },
204-
alloc,
204+
&alloc,
205205
)),
206206
Self::Chain(e) => {
207-
let mut expressions = Vec::new_in(alloc);
207+
let mut expressions = Vec::new_in(&alloc);
208208
for expr in e.expressions.iter() {
209209
expressions.push(expr.clone_in(alloc));
210210
}
211211
Self::Chain(Box::new_in(
212212
Chain { span: e.span, source_span: e.source_span, expressions },
213-
alloc,
213+
&alloc,
214214
))
215215
}
216216
Self::Conditional(e) => Self::Conditional(Box::new_in(
@@ -221,7 +221,7 @@ impl<'a> AngularExpression<'a> {
221221
true_exp: e.true_exp.clone_in(alloc),
222222
false_exp: e.false_exp.clone_in(alloc),
223223
},
224-
alloc,
224+
&alloc,
225225
)),
226226
Self::PropertyRead(e) => Self::PropertyRead(Box::new_in(
227227
PropertyRead {
@@ -231,7 +231,7 @@ impl<'a> AngularExpression<'a> {
231231
receiver: e.receiver.clone_in(alloc),
232232
name: e.name.clone(),
233233
},
234-
alloc,
234+
&alloc,
235235
)),
236236
Self::SafePropertyRead(e) => Self::SafePropertyRead(Box::new_in(
237237
SafePropertyRead {
@@ -241,7 +241,7 @@ impl<'a> AngularExpression<'a> {
241241
receiver: e.receiver.clone_in(alloc),
242242
name: e.name.clone(),
243243
},
244-
alloc,
244+
&alloc,
245245
)),
246246
Self::KeyedRead(e) => Self::KeyedRead(Box::new_in(
247247
KeyedRead {
@@ -250,7 +250,7 @@ impl<'a> AngularExpression<'a> {
250250
receiver: e.receiver.clone_in(alloc),
251251
key: e.key.clone_in(alloc),
252252
},
253-
alloc,
253+
&alloc,
254254
)),
255255
Self::SafeKeyedRead(e) => Self::SafeKeyedRead(Box::new_in(
256256
SafeKeyedRead {
@@ -259,10 +259,10 @@ impl<'a> AngularExpression<'a> {
259259
receiver: e.receiver.clone_in(alloc),
260260
key: e.key.clone_in(alloc),
261261
},
262-
alloc,
262+
&alloc,
263263
)),
264264
Self::BindingPipe(e) => {
265-
let mut args = Vec::new_in(alloc);
265+
let mut args = Vec::new_in(&alloc);
266266
for arg in e.args.iter() {
267267
args.push(arg.clone_in(alloc));
268268
}
@@ -276,7 +276,7 @@ impl<'a> AngularExpression<'a> {
276276
args,
277277
pipe_type: e.pipe_type,
278278
},
279-
alloc,
279+
&alloc,
280280
))
281281
}
282282
Self::LiteralPrimitive(e) => Self::LiteralPrimitive(Box::new_in(
@@ -285,20 +285,20 @@ impl<'a> AngularExpression<'a> {
285285
source_span: e.source_span,
286286
value: e.value.clone(),
287287
},
288-
alloc,
288+
&alloc,
289289
)),
290290
Self::LiteralArray(e) => {
291-
let mut expressions = Vec::new_in(alloc);
291+
let mut expressions = Vec::new_in(&alloc);
292292
for expr in e.expressions.iter() {
293293
expressions.push(expr.clone_in(alloc));
294294
}
295295
Self::LiteralArray(Box::new_in(
296296
LiteralArray { span: e.span, source_span: e.source_span, expressions },
297-
alloc,
297+
&alloc,
298298
))
299299
}
300300
Self::LiteralMap(e) => {
301-
let mut keys = Vec::new_in(alloc);
301+
let mut keys = Vec::new_in(&alloc);
302302
for key in e.keys.iter() {
303303
keys.push(match key {
304304
LiteralMapKey::Property(prop) => {
@@ -316,21 +316,21 @@ impl<'a> AngularExpression<'a> {
316316
}
317317
});
318318
}
319-
let mut values = Vec::new_in(alloc);
319+
let mut values = Vec::new_in(&alloc);
320320
for val in e.values.iter() {
321321
values.push(val.clone_in(alloc));
322322
}
323323
Self::LiteralMap(Box::new_in(
324324
LiteralMap { span: e.span, source_span: e.source_span, keys, values },
325-
alloc,
325+
&alloc,
326326
))
327327
}
328328
Self::Interpolation(e) => {
329-
let mut strings = Vec::new_in(alloc);
329+
let mut strings = Vec::new_in(&alloc);
330330
for s in e.strings.iter() {
331331
strings.push(s.clone());
332332
}
333-
let mut expressions = Vec::new_in(alloc);
333+
let mut expressions = Vec::new_in(&alloc);
334334
for expr in e.expressions.iter() {
335335
expressions.push(expr.clone_in(alloc));
336336
}
@@ -341,7 +341,7 @@ impl<'a> AngularExpression<'a> {
341341
strings,
342342
expressions,
343343
},
344-
alloc,
344+
&alloc,
345345
))
346346
}
347347
Self::Binary(e) => Self::Binary(Box::new_in(
@@ -352,7 +352,7 @@ impl<'a> AngularExpression<'a> {
352352
left: e.left.clone_in(alloc),
353353
right: e.right.clone_in(alloc),
354354
},
355-
alloc,
355+
&alloc,
356356
)),
357357
Self::Unary(e) => Self::Unary(Box::new_in(
358358
Unary {
@@ -361,42 +361,42 @@ impl<'a> AngularExpression<'a> {
361361
operator: e.operator.clone(),
362362
expr: e.expr.clone_in(alloc),
363363
},
364-
alloc,
364+
&alloc,
365365
)),
366366
Self::PrefixNot(e) => Self::PrefixNot(Box::new_in(
367367
PrefixNot {
368368
span: e.span,
369369
source_span: e.source_span,
370370
expression: e.expression.clone_in(alloc),
371371
},
372-
alloc,
372+
&alloc,
373373
)),
374374
Self::TypeofExpression(e) => Self::TypeofExpression(Box::new_in(
375375
TypeofExpression {
376376
span: e.span,
377377
source_span: e.source_span,
378378
expression: e.expression.clone_in(alloc),
379379
},
380-
alloc,
380+
&alloc,
381381
)),
382382
Self::VoidExpression(e) => Self::VoidExpression(Box::new_in(
383383
VoidExpression {
384384
span: e.span,
385385
source_span: e.source_span,
386386
expression: e.expression.clone_in(alloc),
387387
},
388-
alloc,
388+
&alloc,
389389
)),
390390
Self::NonNullAssert(e) => Self::NonNullAssert(Box::new_in(
391391
NonNullAssert {
392392
span: e.span,
393393
source_span: e.source_span,
394394
expression: e.expression.clone_in(alloc),
395395
},
396-
alloc,
396+
&alloc,
397397
)),
398398
Self::Call(e) => {
399-
let mut args = Vec::new_in(alloc);
399+
let mut args = Vec::new_in(&alloc);
400400
for arg in e.args.iter() {
401401
args.push(arg.clone_in(alloc));
402402
}
@@ -408,11 +408,11 @@ impl<'a> AngularExpression<'a> {
408408
args,
409409
argument_span: e.argument_span,
410410
},
411-
alloc,
411+
&alloc,
412412
))
413413
}
414414
Self::SafeCall(e) => {
415-
let mut args = Vec::new_in(alloc);
415+
let mut args = Vec::new_in(&alloc);
416416
for arg in e.args.iter() {
417417
args.push(arg.clone_in(alloc));
418418
}
@@ -424,19 +424,19 @@ impl<'a> AngularExpression<'a> {
424424
args,
425425
argument_span: e.argument_span,
426426
},
427-
alloc,
427+
&alloc,
428428
))
429429
}
430430
Self::TaggedTemplateLiteral(e) => {
431-
let mut elements = Vec::new_in(alloc);
431+
let mut elements = Vec::new_in(&alloc);
432432
for el in e.template.elements.iter() {
433433
elements.push(TemplateLiteralElement {
434434
span: el.span,
435435
source_span: el.source_span,
436436
text: el.text.clone(),
437437
});
438438
}
439-
let mut expressions = Vec::new_in(alloc);
439+
let mut expressions = Vec::new_in(&alloc);
440440
for expr in e.template.expressions.iter() {
441441
expressions.push(expr.clone_in(alloc));
442442
}
@@ -452,19 +452,19 @@ impl<'a> AngularExpression<'a> {
452452
expressions,
453453
},
454454
},
455-
alloc,
455+
&alloc,
456456
))
457457
}
458458
Self::TemplateLiteral(e) => {
459-
let mut elements = Vec::new_in(alloc);
459+
let mut elements = Vec::new_in(&alloc);
460460
for el in e.elements.iter() {
461461
elements.push(TemplateLiteralElement {
462462
span: el.span,
463463
source_span: el.source_span,
464464
text: el.text.clone(),
465465
});
466466
}
467-
let mut expressions = Vec::new_in(alloc);
467+
let mut expressions = Vec::new_in(&alloc);
468468
for expr in e.expressions.iter() {
469469
expressions.push(expr.clone_in(alloc));
470470
}
@@ -475,7 +475,7 @@ impl<'a> AngularExpression<'a> {
475475
elements,
476476
expressions,
477477
},
478-
alloc,
478+
&alloc,
479479
))
480480
}
481481
Self::ParenthesizedExpression(e) => Self::ParenthesizedExpression(Box::new_in(
@@ -484,7 +484,7 @@ impl<'a> AngularExpression<'a> {
484484
source_span: e.source_span,
485485
expression: e.expression.clone_in(alloc),
486486
},
487-
alloc,
487+
&alloc,
488488
)),
489489
Self::RegularExpressionLiteral(e) => Self::RegularExpressionLiteral(Box::new_in(
490490
RegularExpressionLiteral {
@@ -493,18 +493,18 @@ impl<'a> AngularExpression<'a> {
493493
body: e.body.clone(),
494494
flags: e.flags.clone(),
495495
},
496-
alloc,
496+
&alloc,
497497
)),
498498
Self::SpreadElement(e) => Self::SpreadElement(Box::new_in(
499499
SpreadElement {
500500
span: e.span,
501501
source_span: e.source_span,
502502
expression: e.expression.clone_in(alloc),
503503
},
504-
alloc,
504+
&alloc,
505505
)),
506506
Self::ArrowFunction(e) => {
507-
let mut parameters = Vec::new_in(alloc);
507+
let mut parameters = Vec::new_in(&alloc);
508508
for param in e.parameters.iter() {
509509
parameters.push(ArrowFunctionParameter {
510510
name: param.name.clone(),
@@ -519,7 +519,7 @@ impl<'a> AngularExpression<'a> {
519519
parameters,
520520
body: e.body.clone_in(alloc),
521521
},
522-
alloc,
522+
&alloc,
523523
))
524524
}
525525
}

‎crates/oxc_angular_compiler/src/ast/html.rs‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -510,9 +510,9 @@ mod tests {
510510
name: Ident::from("span"),
511511
component_prefix: None,
512512
component_tag_name: None,
513-
attrs: Vec::new_in(&allocator),
514-
directives: Vec::new_in(&allocator),
515-
children: Vec::new_in(&allocator),
513+
attrs: Vec::new_in(&&allocator),
514+
directives: Vec::new_in(&&allocator),
515+
children: Vec::new_in(&&allocator),
516516
span: Span::default(),
517517
start_span: Span::default(),
518518
end_span: None,
@@ -524,26 +524,26 @@ mod tests {
524524
name: Ident::from("p"),
525525
component_prefix: None,
526526
component_tag_name: None,
527-
attrs: Vec::new_in(&allocator),
528-
directives: Vec::new_in(&allocator),
529-
children: Vec::new_in(&allocator),
527+
attrs: Vec::new_in(&&allocator),
528+
directives: Vec::new_in(&&allocator),
529+
children: Vec::new_in(&&allocator),
530530
span: Span::default(),
531531
start_span: Span::default(),
532532
end_span: None,
533533
is_self_closing: false,
534534
is_void: false,
535535
};
536536

537-
let mut children = Vec::new_in(&allocator);
538-
children.push(HtmlNode::Element(Box::new_in(child1, &allocator)));
539-
children.push(HtmlNode::Element(Box::new_in(child2, &allocator)));
537+
let mut children = Vec::new_in(&&allocator);
538+
children.push(HtmlNode::Element(Box::new_in(child1, &&allocator)));
539+
children.push(HtmlNode::Element(Box::new_in(child2, &&allocator)));
540540

541541
let root = HtmlElement {
542542
name: Ident::from("div"),
543543
component_prefix: None,
544544
component_tag_name: None,
545-
attrs: Vec::new_in(&allocator),
546-
directives: Vec::new_in(&allocator),
545+
attrs: Vec::new_in(&&allocator),
546+
directives: Vec::new_in(&&allocator),
547547
children,
548548
span: Span::default(),
549549
start_span: Span::default(),
@@ -552,8 +552,8 @@ mod tests {
552552
is_void: false,
553553
};
554554

555-
let mut nodes = Vec::new_in(&allocator);
556-
nodes.push(HtmlNode::Element(Box::new_in(root, &allocator)));
555+
let mut nodes = Vec::new_in(&&allocator);
556+
nodes.push(HtmlNode::Element(Box::new_in(root, &&allocator)));
557557

558558
let mut counter = ElementCounter { count: 0 };
559559
visit_all(&mut counter, &nodes);
@@ -569,11 +569,11 @@ mod tests {
569569
value: Ident::from("Hello"),
570570
span: Span::default(),
571571
full_start: None,
572-
tokens: Vec::new_in(&allocator),
572+
tokens: Vec::new_in(&&allocator),
573573
};
574574

575-
let mut nodes = Vec::new_in(&allocator);
576-
nodes.push(HtmlNode::Text(Box::new_in(text, &allocator)));
575+
let mut nodes = Vec::new_in(&&allocator);
576+
nodes.push(HtmlNode::Text(Box::new_in(text, &&allocator)));
577577

578578
let mut visited = 0;
579579
traverse_all(&nodes, |_node| {

0 commit comments

Comments
 (0)