@@ -15,7 +15,7 @@ fn test_source_empty() {
15
15
16
16
let dlf = DisplayListFormatter :: new ( false ) ;
17
17
18
- assert_eq ! ( dlf. format( dl) , " |" ) ;
18
+ assert_eq ! ( dlf. format( & dl) , " |" ) ;
19
19
}
20
20
21
21
#[ test]
@@ -42,7 +42,7 @@ fn test_source_content() {
42
42
let dlf = DisplayListFormatter :: new ( false ) ;
43
43
44
44
assert_eq ! (
45
- dlf. format( dl) ,
45
+ dlf. format( & dl) ,
46
46
"56 | This is an example\n 57 | of content lines"
47
47
) ;
48
48
}
@@ -73,7 +73,7 @@ fn test_source_annotation_standalone_singleline() {
73
73
74
74
let dlf = DisplayListFormatter :: new ( false ) ;
75
75
76
- assert_eq ! ( dlf. format( dl) , " | ^^^^^ Example string" ) ;
76
+ assert_eq ! ( dlf. format( & dl) , " | ^^^^^ Example string" ) ;
77
77
}
78
78
79
79
#[ test]
@@ -122,7 +122,7 @@ fn test_source_annotation_standalone_multiline() {
122
122
let dlf = DisplayListFormatter :: new ( false ) ;
123
123
124
124
assert_eq ! (
125
- dlf. format( dl) ,
125
+ dlf. format( & dl) ,
126
126
" | ----- help: Example string\n | Second line"
127
127
) ;
128
128
}
@@ -267,7 +267,7 @@ fn test_source_annotation_standalone_multi_annotation() {
267
267
268
268
let dlf = DisplayListFormatter :: new ( false ) ;
269
269
270
- assert_eq ! ( dlf. format( dl) , " | ----- info: Example string\n | Second line\n | warning: This is a note\n | Second line of the warning\n | ----- info: This is an info\n | ----- help: This is help\n | This is an annotation of type none" ) ;
270
+ assert_eq ! ( dlf. format( & dl) , " | ----- info: Example string\n | Second line\n | warning: This is a note\n | Second line of the warning\n | ----- info: This is an info\n | ----- help: This is help\n | This is an annotation of type none" ) ;
271
271
}
272
272
273
273
#[ test]
@@ -297,7 +297,7 @@ fn test_fold_line() {
297
297
let dlf = DisplayListFormatter :: new ( false ) ;
298
298
299
299
assert_eq ! (
300
- dlf. format( dl) ,
300
+ dlf. format( & dl) ,
301
301
" 5 | This is line 5\n ...\n 10021 | ... and now we're at line 10021"
302
302
) ;
303
303
}
@@ -314,7 +314,7 @@ fn test_raw_origin_initial_nopos() {
314
314
315
315
let dlf = DisplayListFormatter :: new ( false ) ;
316
316
317
- assert_eq ! ( dlf. format( dl) , "--> src/test.rs" ) ;
317
+ assert_eq ! ( dlf. format( & dl) , "--> src/test.rs" ) ;
318
318
}
319
319
320
320
#[ test]
@@ -329,7 +329,7 @@ fn test_raw_origin_initial_pos() {
329
329
330
330
let dlf = DisplayListFormatter :: new ( false ) ;
331
331
332
- assert_eq ! ( dlf. format( dl) , "--> src/test.rs:23:15" ) ;
332
+ assert_eq ! ( dlf. format( & dl) , "--> src/test.rs:23:15" ) ;
333
333
}
334
334
335
335
#[ test]
@@ -344,7 +344,7 @@ fn test_raw_origin_continuation() {
344
344
345
345
let dlf = DisplayListFormatter :: new ( false ) ;
346
346
347
- assert_eq ! ( dlf. format( dl) , "::: src/test.rs:23:15" ) ;
347
+ assert_eq ! ( dlf. format( & dl) , "::: src/test.rs:23:15" ) ;
348
348
}
349
349
350
350
#[ test]
@@ -368,7 +368,7 @@ fn test_raw_annotation_unaligned() {
368
368
369
369
let dlf = DisplayListFormatter :: new ( false ) ;
370
370
371
- assert_eq ! ( dlf. format( dl) , "error[E0001]: This is an error" ) ;
371
+ assert_eq ! ( dlf. format( & dl) , "error[E0001]: This is an error" ) ;
372
372
}
373
373
374
374
#[ test]
@@ -407,7 +407,7 @@ fn test_raw_annotation_unaligned_multiline() {
407
407
let dlf = DisplayListFormatter :: new ( false ) ;
408
408
409
409
assert_eq ! (
410
- dlf. format( dl) ,
410
+ dlf. format( & dl) ,
411
411
"warning[E0001]: This is an error\n Second line of the error"
412
412
) ;
413
413
}
@@ -433,7 +433,7 @@ fn test_raw_annotation_aligned() {
433
433
434
434
let dlf = DisplayListFormatter :: new ( false ) ;
435
435
436
- assert_eq ! ( dlf. format( dl) , " = error[E0001]: This is an error" ) ;
436
+ assert_eq ! ( dlf. format( & dl) , " = error[E0001]: This is an error" ) ;
437
437
}
438
438
439
439
#[ test]
@@ -472,7 +472,7 @@ fn test_raw_annotation_aligned_multiline() {
472
472
let dlf = DisplayListFormatter :: new ( false ) ;
473
473
474
474
assert_eq ! (
475
- dlf. format( dl) ,
475
+ dlf. format( & dl) ,
476
476
" = warning[E0001]: This is an error\n Second line of the error"
477
477
) ;
478
478
}
@@ -527,7 +527,7 @@ fn test_different_annotation_types() {
527
527
let dlf = DisplayListFormatter :: new ( false ) ;
528
528
529
529
assert_eq ! (
530
- dlf. format( dl) ,
530
+ dlf. format( & dl) ,
531
531
"note: This is a note\n This is just a string\n Second line of none type annotation" ,
532
532
) ;
533
533
}
@@ -549,5 +549,5 @@ fn test_inline_marks_empty_line() {
549
549
550
550
let dlf = DisplayListFormatter :: new ( false ) ;
551
551
552
- assert_eq ! ( dlf. format( dl) , " | |" , ) ;
552
+ assert_eq ! ( dlf. format( & dl) , " | |" , ) ;
553
553
}
0 commit comments