Skip to content

Commit 3c9caea

Browse files
committed
fix warnings
1 parent 704e6d9 commit 3c9caea

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/expr.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,6 @@ mod tests {
361361
#[test]
362362
fn test_pretty_print_literals() {
363363
let arena = ExprArena::new();
364-
let decls = DeclTable::new(vec![]);
365364

366365
assert_eq!(Expr::Int(42).pretty_print(&arena, 0), "42");
367366
assert_eq!(Expr::UInt(100).pretty_print(&arena, 0), "100");
@@ -375,7 +374,6 @@ mod tests {
375374
#[test]
376375
fn test_pretty_print_id() {
377376
let arena = ExprArena::new();
378-
let decls = DeclTable::new(vec![]);
379377

380378
assert_eq!(Expr::Id(Name::str("foo")).pretty_print(&arena, 0), "foo");
381379
assert_eq!(Expr::Enum(Name::str("Active")).pretty_print(&arena, 0), ".Active");
@@ -384,7 +382,6 @@ mod tests {
384382
#[test]
385383
fn test_pretty_print_binop() {
386384
let mut arena = ExprArena::new();
387-
let decls = DeclTable::new(vec![]);
388385

389386
let lhs_id = arena.add(Expr::Int(1), test_loc());
390387
let rhs_id = arena.add(Expr::Int(2), test_loc());
@@ -402,7 +399,6 @@ mod tests {
402399
#[test]
403400
fn test_pretty_print_unop() {
404401
let mut arena = ExprArena::new();
405-
let decls = DeclTable::new(vec![]);
406402

407403
let expr_id = arena.add(Expr::Int(42), test_loc());
408404

@@ -417,7 +413,6 @@ mod tests {
417413
#[test]
418414
fn test_pretty_print_call() {
419415
let mut arena = ExprArena::new();
420-
let decls = DeclTable::new(vec![]);
421416

422417
let func_id = arena.add(Expr::Id(Name::str("foo")), test_loc());
423418
let arg1_id = arena.add(Expr::Int(1), test_loc());
@@ -433,7 +428,6 @@ mod tests {
433428
#[test]
434429
fn test_pretty_print_array_literal() {
435430
let mut arena = ExprArena::new();
436-
let decls = DeclTable::new(vec![]);
437431

438432
let elem1 = arena.add(Expr::Int(1), test_loc());
439433
let elem2 = arena.add(Expr::Int(2), test_loc());
@@ -446,7 +440,6 @@ mod tests {
446440
#[test]
447441
fn test_pretty_print_array_index() {
448442
let mut arena = ExprArena::new();
449-
let decls = DeclTable::new(vec![]);
450443

451444
let arr_id = arena.add(Expr::Id(Name::str("arr")), test_loc());
452445
let idx_id = arena.add(Expr::Int(0), test_loc());
@@ -458,7 +451,6 @@ mod tests {
458451
#[test]
459452
fn test_pretty_print_field() {
460453
let mut arena = ExprArena::new();
461-
let decls = DeclTable::new(vec![]);
462454

463455
let obj_id = arena.add(Expr::Id(Name::str("point")), test_loc());
464456
let field_expr = Expr::Field(obj_id, Name::str("x"));
@@ -469,7 +461,6 @@ mod tests {
469461
#[test]
470462
fn test_pretty_print_var() {
471463
let mut arena = ExprArena::new();
472-
let decls = DeclTable::new(vec![]);
473464

474465
// var x
475466
let var1 = Expr::Var(Name::str("x"), None, None);
@@ -492,7 +483,6 @@ mod tests {
492483
#[test]
493484
fn test_pretty_print_let() {
494485
let mut arena = ExprArena::new();
495-
let decls = DeclTable::new(vec![]);
496486

497487
let value_id = arena.add(Expr::Int(42), test_loc());
498488

@@ -508,7 +498,6 @@ mod tests {
508498
#[test]
509499
fn test_pretty_print_assign() {
510500
let mut arena = ExprArena::new();
511-
let decls = DeclTable::new(vec![]);
512501

513502
let value_id = arena.add(Expr::Int(42), test_loc());
514503
let assign_expr = Expr::Assign(Name::str("x"), value_id);
@@ -519,7 +508,6 @@ mod tests {
519508
#[test]
520509
fn test_pretty_print_lambda() {
521510
let mut arena = ExprArena::new();
522-
let decls = DeclTable::new(vec![]);
523511

524512
// |x| x + 1
525513
let x_id = arena.add(Expr::Id(Name::str("x")), test_loc());
@@ -537,7 +525,6 @@ mod tests {
537525
#[test]
538526
fn test_pretty_print_if() {
539527
let mut arena = ExprArena::new();
540-
let decls = DeclTable::new(vec![]);
541528

542529
let cond_id = arena.add(Expr::True, test_loc());
543530
let then_id = arena.add(Expr::Int(1), test_loc());
@@ -555,7 +542,6 @@ mod tests {
555542
#[test]
556543
fn test_pretty_print_while() {
557544
let mut arena = ExprArena::new();
558-
let decls = DeclTable::new(vec![]);
559545

560546
let cond_id = arena.add(Expr::True, test_loc());
561547
let body_id = arena.add(Expr::Block(vec![]), test_loc());
@@ -567,7 +553,6 @@ mod tests {
567553
#[test]
568554
fn test_pretty_print_for() {
569555
let mut arena = ExprArena::new();
570-
let decls = DeclTable::new(vec![]);
571556

572557
let start_id = arena.add(Expr::Int(0), test_loc());
573558
let end_id = arena.add(Expr::Int(10), test_loc());
@@ -586,7 +571,6 @@ mod tests {
586571
#[test]
587572
fn test_pretty_print_block() {
588573
let mut arena = ExprArena::new();
589-
let decls = DeclTable::new(vec![]);
590574

591575
// Empty block
592576
let empty_block = Expr::Block(vec![]);
@@ -603,7 +587,6 @@ mod tests {
603587
#[test]
604588
fn test_pretty_print_return() {
605589
let mut arena = ExprArena::new();
606-
let decls = DeclTable::new(vec![]);
607590

608591
let value_id = arena.add(Expr::Int(42), test_loc());
609592
let return_expr = Expr::Return(value_id);
@@ -614,7 +597,6 @@ mod tests {
614597
#[test]
615598
fn test_pretty_print_tuple() {
616599
let mut arena = ExprArena::new();
617-
let decls = DeclTable::new(vec![]);
618600

619601
let elem1 = arena.add(Expr::Int(1), test_loc());
620602
let elem2 = arena.add(Expr::String("hello".to_string()), test_loc());

0 commit comments

Comments
 (0)