@@ -98,6 +98,7 @@ fn foo() {
98
98
let text = make_string ( & lines) ;
99
99
assert_eq ! ( & text[ ..] , & "
100
100
--> foo.rs:3:2
101
+ |>
101
102
3 |> \t bar;
102
103
|> \t ^^^
103
104
" [ 1 ..] ) ;
@@ -130,6 +131,7 @@ fn foo() {
130
131
println ! ( "text=\n {}" , text) ;
131
132
assert_eq ! ( & text[ ..] , & r#"
132
133
::: foo.rs
134
+ |>
133
135
3 |> vec.push(vec.pop().unwrap());
134
136
|> --- --- - previous borrow ends here
135
137
|> | |
@@ -199,12 +201,14 @@ fn bar() {
199
201
// Note that the `|>` remain aligned across both files:
200
202
assert_eq ! ( & text[ ..] , & r#"
201
203
--> foo.rs:3:14
204
+ |>
202
205
3 |> vec.push(vec.pop().unwrap());
203
206
|> --- ^^^ - c
204
207
|> | |
205
208
|> | b
206
209
|> a
207
210
::: bar.rs
211
+ |>
208
212
17 |> vec.push();
209
213
|> --- - f
210
214
|> |
@@ -249,6 +253,7 @@ fn foo() {
249
253
println ! ( "text=\n {}" , text) ;
250
254
assert_eq ! ( & text[ ..] , & r#"
251
255
::: foo.rs
256
+ |>
252
257
3 |> let name = find_id(&data, 22).unwrap();
253
258
|> ---- immutable borrow begins here
254
259
...
@@ -288,6 +293,7 @@ fn foo() {
288
293
println ! ( "text=r#\" \n {}\" .trim_left()" , text) ;
289
294
assert_eq ! ( & text[ ..] , & r#"
290
295
::: foo.rs
296
+ |>
291
297
3 |> vec.push(vec.pop().unwrap());
292
298
|> -------- ------ D
293
299
|> ||
@@ -324,6 +330,7 @@ fn foo() {
324
330
println ! ( "text=r#\" \n {}\" .trim_left()" , text) ;
325
331
assert_eq ! ( & text[ ..] , & r#"
326
332
::: foo.rs
333
+ |>
327
334
3 |> vec.push(vec.pop().unwrap());
328
335
|> --- --- - previous borrow ends here
329
336
|> | |
@@ -362,6 +369,7 @@ fn foo() {
362
369
println ! ( "text=r#\" \n {}\" .trim_left()" , text) ;
363
370
assert_eq ! ( & text[ ..] , & r#"
364
371
::: foo.rs
372
+ |>
365
373
4 |> let mut vec2 = vec;
366
374
|> --- `vec` moved here because it has type `collections::vec::Vec<i32>`
367
375
...
@@ -398,6 +406,7 @@ fn foo() {
398
406
println ! ( "text=&r#\" \n {}\n \" #[1..]" , text) ;
399
407
assert_eq ! ( text, & r#"
400
408
::: foo.rs
409
+ |>
401
410
3 |> let mut vec = vec![0, 1, 2];
402
411
|> --- ---
403
412
4 |> let mut vec2 = vec;
@@ -429,6 +438,7 @@ impl SomeTrait for () {
429
438
println ! ( "r#\" \n {}\" " , text) ;
430
439
assert_eq ! ( text, & r#"
431
440
::: foo.rs
441
+ |>
432
442
3 |> fn foo(x: u32) {
433
443
|> -
434
444
"# [ 1 ..] ) ;
@@ -458,6 +468,7 @@ fn span_overlap_label() {
458
468
println ! ( "r#\" \n {}\" " , text) ;
459
469
assert_eq ! ( text, & r#"
460
470
::: foo.rs
471
+ |>
461
472
2 |> fn foo(x: u32) {
462
473
|> --------------
463
474
|> | |
@@ -492,6 +503,7 @@ fn span_overlap_label2() {
492
503
println ! ( "r#\" \n {}\" " , text) ;
493
504
assert_eq ! ( text, & r#"
494
505
::: foo.rs
506
+ |>
495
507
2 |> fn foo(x: u32) {
496
508
|> --------------
497
509
|> | |
@@ -537,6 +549,7 @@ fn span_overlap_label3() {
537
549
println ! ( "r#\" \n {}\" " , text) ;
538
550
assert_eq ! ( text, & r#"
539
551
::: foo.rs
552
+ |>
540
553
3 |> let closure = || {
541
554
|> - foo
542
555
4 |> inner
@@ -577,6 +590,7 @@ fn main() {
577
590
println ! ( "r#\" \n {}\" " , text) ;
578
591
assert_eq ! ( text, & r#"
579
592
--> foo.rs:11:2
593
+ |>
580
594
11 |> }
581
595
|> -
582
596
"# [ 1 ..] ) ;
0 commit comments