Skip to content

Commit 503f2bc

Browse files
authored
Rollup merge of rust-lang#134181 - estebank:trim-render, r=oli-obk
Tweak multispan rendering to reduce output length Consider comments and bare delimiters the same as an "empty line" for purposes of hiding rendered code output of long multispans. This results in more aggressive shortening of rendered output without losing too much context, specially in `*.stderr` tests that have "hidden" comments. We do that check not only on the first 4 lines of the multispan, but now also on the previous to last line as well.
2 parents 695f938 + f33deb7 commit 503f2bc

Some content is hidden

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

46 files changed

+32
-155
lines changed

tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.default.stderr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ LL | | fn clone_self(&self) -> Self {
2020
LL | | Self {
2121
LL | | a: true,
2222
... |
23-
LL | | }
2423
LL | | }
2524
| |_^
2625
|
@@ -32,7 +31,6 @@ LL | | fn default() -> Self {
3231
LL | | Self {
3332
LL | | a: true,
3433
... |
35-
LL | | }
3634
LL | | }
3735
| |_^
3836

tests/ui-toml/excessive_nesting/excessive_nesting.stderr

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ error: this block is too nested
6666
LL | if true {
6767
| _________________________^
6868
LL | | if true {
69-
LL | |
70-
LL | | }
69+
... |
7170
LL | | }
7271
| |_________________^
7372
|

tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.default.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,6 @@ LL | | if unsafe { true } {
286286
LL | | todo!();
287287
LL | | } else {
288288
... |
289-
LL | | }
290289
LL | | };
291290
| |______^
292291
|

tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.disabled.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,6 @@ LL | | if unsafe { true } {
294294
LL | | todo!();
295295
LL | | } else {
296296
... |
297-
LL | | }
298297
LL | | };
299298
| |______^
300299
|

tests/ui/async_yields_async.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ error: an async construct yields a type which is itself awaitable
8080
LL | let _m = async || {
8181
| _______________________-
8282
LL | | println!("I'm bored");
83-
LL | | // Some more stuff
8483
... |
8584
LL | | CustomFutureType
8685
| | ^^^^^^^^^^^^^^^^

tests/ui/bind_instead_of_map_multipart.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ LL | | if {
4444
LL | | if s == "43" {
4545
LL | | return Some(43);
4646
... |
47-
LL | | }
4847
LL | | });
4948
| |______^
5049
|

tests/ui/branches_sharing_code/shared_at_bottom.stderr

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@ error: all if blocks contain the same code at the end
115115
--> tests/ui/branches_sharing_code/shared_at_bottom.rs:183:5
116116
|
117117
LL | / x << 2
118-
LL | |
119-
LL | |
118+
... |
120119
LL | | };
121120
| |_____^
122121
|
@@ -131,8 +130,7 @@ error: all if blocks contain the same code at the end
131130
--> tests/ui/branches_sharing_code/shared_at_bottom.rs:192:5
132131
|
133132
LL | / x * 4
134-
LL | |
135-
LL | |
133+
... |
136134
LL | | }
137135
| |_____^
138136
|

tests/ui/collapsible_else_if.stderr

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ LL | } else {
4343
| ____________^
4444
LL | | if y == "world" {
4545
LL | | println!("world")
46-
LL | | }
4746
... |
48-
LL | | }
4947
LL | | }
5048
| |_____^
5149
|
@@ -66,9 +64,7 @@ LL | } else {
6664
| ____________^
6765
LL | | if let Some(42) = Some(42) {
6866
LL | | println!("world")
69-
LL | | }
7067
... |
71-
LL | | }
7268
LL | | }
7369
| |_____^
7470
|
@@ -89,9 +85,7 @@ LL | } else {
8985
| ____________^
9086
LL | | if let Some(42) = Some(42) {
9187
LL | | println!("world")
92-
LL | | }
9388
... |
94-
LL | | }
9589
LL | | }
9690
| |_____^
9791
|
@@ -112,9 +106,7 @@ LL | } else {
112106
| ____________^
113107
LL | | if x == "hello" {
114108
LL | | println!("world")
115-
LL | | }
116109
... |
117-
LL | | }
118110
LL | | }
119111
| |_____^
120112
|
@@ -135,9 +127,7 @@ LL | } else {
135127
| ____________^
136128
LL | | if let Some(42) = Some(42) {
137129
LL | | println!("world")
138-
LL | | }
139130
... |
140-
LL | | }
141131
LL | | }
142132
| |_____^
143133
|

tests/ui/copy_iterator.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ LL | |
66
LL | |
77
LL | | type Item = u8;
88
... |
9-
LL | | }
109
LL | | }
1110
| |_^
1211
|

tests/ui/crashes/ice-360.stderr

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@ error: this loop never actually loops
22
--> tests/ui/crashes/ice-360.rs:5:5
33
|
44
LL | / loop {
5-
LL | |
6-
LL | |
7-
LL | |
85
... |
9-
LL | |
106
LL | | }
117
| |_____^
128
|
@@ -16,11 +12,7 @@ error: this loop could be written as a `while let` loop
1612
--> tests/ui/crashes/ice-360.rs:5:5
1713
|
1814
LL | / loop {
19-
LL | |
20-
LL | |
21-
LL | |
2215
... |
23-
LL | |
2416
LL | | }
2517
| |_____^ help: try: `while let Some(ele) = iter.next() { .. }`
2618
|

0 commit comments

Comments
 (0)