Skip to content

Commit a317bc9

Browse files
author
Michael Recachinas
committed
Update stderrs for print and write_literal
1 parent 54c0edc commit a317bc9

File tree

2 files changed

+72
-96
lines changed

2 files changed

+72
-96
lines changed

tests/ui/print_literal.stderr

Lines changed: 34 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,88 @@
11
error: printing a literal with an empty format string
2-
--> $DIR/print_literal.rs:14:24
2+
--> $DIR/print_literal.rs:23:71
33
|
4-
14 | print!("Hello {}", "world");
5-
| ^^^^^^^
4+
23 | println!("{} of {:b} people know binary, the other half doesn't", 1, 2);
5+
| ^
66
|
77
= note: `-D print-literal` implied by `-D warnings`
88

99
error: printing a literal with an empty format string
10-
--> $DIR/print_literal.rs:15:36
10+
--> $DIR/print_literal.rs:24:24
1111
|
12-
15 | println!("Hello {} {}", world, "world");
12+
24 | print!("Hello {}", "world");
13+
| ^^^^^^^
14+
15+
error: printing a literal with an empty format string
16+
--> $DIR/print_literal.rs:25:36
17+
|
18+
25 | println!("Hello {} {}", world, "world");
1319
| ^^^^^^^
1420

1521
error: printing a literal with an empty format string
16-
--> $DIR/print_literal.rs:16:26
22+
--> $DIR/print_literal.rs:26:26
1723
|
18-
16 | println!("Hello {}", "world");
24+
26 | println!("Hello {}", "world");
1925
| ^^^^^^^
2026

2127
error: printing a literal with an empty format string
22-
--> $DIR/print_literal.rs:17:30
28+
--> $DIR/print_literal.rs:27:30
2329
|
24-
17 | println!("10 / 4 is {}", 2.5);
30+
27 | println!("10 / 4 is {}", 2.5);
2531
| ^^^
2632

2733
error: printing a literal with an empty format string
28-
--> $DIR/print_literal.rs:18:28
34+
--> $DIR/print_literal.rs:28:28
2935
|
30-
18 | println!("2 + 1 = {}", 3);
36+
28 | println!("2 + 1 = {}", 3);
3137
| ^
3238

3339
error: printing a literal with an empty format string
34-
--> $DIR/print_literal.rs:19:31
35-
|
36-
19 | println!("2 + 1 = {:.4}", 3);
37-
| ^
38-
39-
error: printing a literal with an empty format string
40-
--> $DIR/print_literal.rs:20:32
41-
|
42-
20 | println!("2 + 1 = {:5.4}", 3);
43-
| ^
44-
45-
error: printing a literal with an empty format string
46-
--> $DIR/print_literal.rs:21:33
47-
|
48-
21 | println!("Debug test {:?}", "hello, world");
49-
| ^^^^^^^^^^^^^^
50-
51-
error: printing a literal with an empty format string
52-
--> $DIR/print_literal.rs:26:25
40+
--> $DIR/print_literal.rs:33:25
5341
|
54-
26 | println!("{0} {1}", "hello", "world");
42+
33 | println!("{0} {1}", "hello", "world");
5543
| ^^^^^^^
5644

5745
error: printing a literal with an empty format string
58-
--> $DIR/print_literal.rs:26:34
46+
--> $DIR/print_literal.rs:33:34
5947
|
60-
26 | println!("{0} {1}", "hello", "world");
48+
33 | println!("{0} {1}", "hello", "world");
6149
| ^^^^^^^
6250

6351
error: printing a literal with an empty format string
64-
--> $DIR/print_literal.rs:27:25
52+
--> $DIR/print_literal.rs:34:25
6553
|
66-
27 | println!("{1} {0}", "hello", "world");
54+
34 | println!("{1} {0}", "hello", "world");
6755
| ^^^^^^^
6856

6957
error: printing a literal with an empty format string
70-
--> $DIR/print_literal.rs:27:34
58+
--> $DIR/print_literal.rs:34:34
7159
|
72-
27 | println!("{1} {0}", "hello", "world");
60+
34 | println!("{1} {0}", "hello", "world");
7361
| ^^^^^^^
7462

7563
error: printing a literal with an empty format string
76-
--> $DIR/print_literal.rs:30:33
64+
--> $DIR/print_literal.rs:37:33
7765
|
78-
30 | println!("{foo} {bar}", foo="hello", bar="world");
66+
37 | println!("{foo} {bar}", foo="hello", bar="world");
7967
| ^^^^^^^
8068

8169
error: printing a literal with an empty format string
82-
--> $DIR/print_literal.rs:30:46
70+
--> $DIR/print_literal.rs:37:46
8371
|
84-
30 | println!("{foo} {bar}", foo="hello", bar="world");
72+
37 | println!("{foo} {bar}", foo="hello", bar="world");
8573
| ^^^^^^^
8674

8775
error: printing a literal with an empty format string
88-
--> $DIR/print_literal.rs:31:33
76+
--> $DIR/print_literal.rs:38:33
8977
|
90-
31 | println!("{bar} {foo}", foo="hello", bar="world");
78+
38 | println!("{bar} {foo}", foo="hello", bar="world");
9179
| ^^^^^^^
9280

9381
error: printing a literal with an empty format string
94-
--> $DIR/print_literal.rs:31:46
82+
--> $DIR/print_literal.rs:38:46
9583
|
96-
31 | println!("{bar} {foo}", foo="hello", bar="world");
84+
38 | println!("{bar} {foo}", foo="hello", bar="world");
9785
| ^^^^^^^
9886

99-
error: aborting due to 16 previous errors
87+
error: aborting due to 14 previous errors
10088

tests/ui/write_literal.stderr

Lines changed: 38 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,88 @@
11
error: writing a literal with an empty format string
2-
--> $DIR/write_literal.rs:17:32
2+
--> $DIR/write_literal.rs:26:79
33
|
4-
17 | write!(&mut v, "Hello {}", "world");
5-
| ^^^^^^^
4+
26 | writeln!(&mut v, "{} of {:b} people know binary, the other half doesn't", 1, 2);
5+
| ^
66
|
77
= note: `-D write-literal` implied by `-D warnings`
88

99
error: writing a literal with an empty format string
10-
--> $DIR/write_literal.rs:18:44
10+
--> $DIR/write_literal.rs:27:32
1111
|
12-
18 | writeln!(&mut v, "Hello {} {}", world, "world");
12+
27 | write!(&mut v, "Hello {}", "world");
13+
| ^^^^^^^
14+
15+
error: writing a literal with an empty format string
16+
--> $DIR/write_literal.rs:28:44
17+
|
18+
28 | writeln!(&mut v, "Hello {} {}", world, "world");
1319
| ^^^^^^^
1420

1521
error: writing a literal with an empty format string
16-
--> $DIR/write_literal.rs:19:34
22+
--> $DIR/write_literal.rs:29:34
1723
|
18-
19 | writeln!(&mut v, "Hello {}", "world");
24+
29 | writeln!(&mut v, "Hello {}", "world");
1925
| ^^^^^^^
2026

2127
error: writing a literal with an empty format string
22-
--> $DIR/write_literal.rs:20:38
28+
--> $DIR/write_literal.rs:30:38
2329
|
24-
20 | writeln!(&mut v, "10 / 4 is {}", 2.5);
30+
30 | writeln!(&mut v, "10 / 4 is {}", 2.5);
2531
| ^^^
2632

2733
error: writing a literal with an empty format string
28-
--> $DIR/write_literal.rs:21:36
34+
--> $DIR/write_literal.rs:31:36
2935
|
30-
21 | writeln!(&mut v, "2 + 1 = {}", 3);
36+
31 | writeln!(&mut v, "2 + 1 = {}", 3);
3137
| ^
3238

3339
error: writing a literal with an empty format string
34-
--> $DIR/write_literal.rs:22:39
35-
|
36-
22 | writeln!(&mut v, "2 + 1 = {:.4}", 3);
37-
| ^
38-
39-
error: writing a literal with an empty format string
40-
--> $DIR/write_literal.rs:23:40
41-
|
42-
23 | writeln!(&mut v, "2 + 1 = {:5.4}", 3);
43-
| ^
44-
45-
error: writing a literal with an empty format string
46-
--> $DIR/write_literal.rs:24:41
47-
|
48-
24 | writeln!(&mut v, "Debug test {:?}", "hello, world");
49-
| ^^^^^^^^^^^^^^
50-
51-
error: writing a literal with an empty format string
52-
--> $DIR/write_literal.rs:29:33
40+
--> $DIR/write_literal.rs:36:33
5341
|
54-
29 | writeln!(&mut v, "{0} {1}", "hello", "world");
42+
36 | writeln!(&mut v, "{0} {1}", "hello", "world");
5543
| ^^^^^^^
5644

5745
error: writing a literal with an empty format string
58-
--> $DIR/write_literal.rs:29:42
46+
--> $DIR/write_literal.rs:36:42
5947
|
60-
29 | writeln!(&mut v, "{0} {1}", "hello", "world");
48+
36 | writeln!(&mut v, "{0} {1}", "hello", "world");
6149
| ^^^^^^^
6250

6351
error: writing a literal with an empty format string
64-
--> $DIR/write_literal.rs:30:33
52+
--> $DIR/write_literal.rs:37:33
6553
|
66-
30 | writeln!(&mut v, "{1} {0}", "hello", "world");
54+
37 | writeln!(&mut v, "{1} {0}", "hello", "world");
6755
| ^^^^^^^
6856

6957
error: writing a literal with an empty format string
70-
--> $DIR/write_literal.rs:30:42
58+
--> $DIR/write_literal.rs:37:42
7159
|
72-
30 | writeln!(&mut v, "{1} {0}", "hello", "world");
60+
37 | writeln!(&mut v, "{1} {0}", "hello", "world");
7361
| ^^^^^^^
7462

7563
error: writing a literal with an empty format string
76-
--> $DIR/write_literal.rs:33:43
64+
--> $DIR/write_literal.rs:40:41
7765
|
78-
33 | writeln!(&mut v, "{foo} {bar}", foo = "hello", bar = "world");
79-
| ^^^^^^^
66+
40 | writeln!(&mut v, "{foo} {bar}", foo="hello", bar="world");
67+
| ^^^^^^^
8068

8169
error: writing a literal with an empty format string
82-
--> $DIR/write_literal.rs:33:58
70+
--> $DIR/write_literal.rs:40:54
8371
|
84-
33 | writeln!(&mut v, "{foo} {bar}", foo = "hello", bar = "world");
85-
| ^^^^^^^
72+
40 | writeln!(&mut v, "{foo} {bar}", foo="hello", bar="world");
73+
| ^^^^^^^
8674

8775
error: writing a literal with an empty format string
88-
--> $DIR/write_literal.rs:34:43
76+
--> $DIR/write_literal.rs:41:41
8977
|
90-
34 | writeln!(&mut v, "{bar} {foo}", foo = "hello", bar = "world");
91-
| ^^^^^^^
78+
41 | writeln!(&mut v, "{bar} {foo}", foo="hello", bar="world");
79+
| ^^^^^^^
9280

9381
error: writing a literal with an empty format string
94-
--> $DIR/write_literal.rs:34:58
82+
--> $DIR/write_literal.rs:41:54
9583
|
96-
34 | writeln!(&mut v, "{bar} {foo}", foo = "hello", bar = "world");
97-
| ^^^^^^^
84+
41 | writeln!(&mut v, "{bar} {foo}", foo="hello", bar="world");
85+
| ^^^^^^^
9886

99-
error: aborting due to 16 previous errors
87+
error: aborting due to 14 previous errors
10088

0 commit comments

Comments
 (0)