about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-03-19 22:11:59 +0000
committerbors <bors@rust-lang.org>2024-03-19 22:11:59 +0000
commitbd459c2877fe909ea57952ea2543b727e321f183 (patch)
tree56fc487b060ee627c1c8b0848d015b76e876e468 /src
parenta7e4de13c1785819f4d61da41f6704ed69d5f203 (diff)
parent957c0d3488de7bc25c8f257cdf4d003bf174bafd (diff)
downloadrust-bd459c2877fe909ea57952ea2543b727e321f183.tar.gz
rust-bd459c2877fe909ea57952ea2543b727e321f183.zip
Auto merge of #122029 - estebank:drive-by-ui-test, r=oli-obk
When displaying multispans, ignore empty lines adjacent to `...`

```
error[E0308]: `match` arms have incompatible types
   --> tests/ui/codemap_tests/huge_multispan_highlight.rs:98:18
    |
6   |       let _ = match true {
    |               ---------- `match` arms have incompatible types
7   |           true => (
    |  _________________-
8   | |             // last line shown in multispan header
...   |
96  | |
97  | |         ),
    | |_________- this is found to be of type `()`
98  |           false => "
    |  __________________^
...   |
119 | |
120 | |         ",
    | |_________^ expected `()`, found `&str`

error[E0308]: `match` arms have incompatible types
   --> tests/ui/codemap_tests/huge_multispan_highlight.rs:215:18
    |
122 |       let _ = match true {
    |               ---------- `match` arms have incompatible types
123 |           true => (
    |  _________________-
124 | |
125 | |         1 // last line shown in multispan header
...   |
213 | |
214 | |         ),
    | |_________- this is found to be of type `{integer}`
215 |           false => "
    |  __________________^
216 | |
217 | |
218 | |         1 last line shown in multispan
...   |
237 | |
238 | |         ",
    | |_________^ expected integer, found `&str`
```
Diffstat (limited to 'src')
-rw-r--r--src/tools/clippy/tests/ui/async_yields_async.stderr3
-rw-r--r--src/tools/clippy/tests/ui/empty_line_after_outer_attribute.stderr3
-rw-r--r--src/tools/compiletest/src/runtest.rs2
3 files changed, 3 insertions, 5 deletions
diff --git a/src/tools/clippy/tests/ui/async_yields_async.stderr b/src/tools/clippy/tests/ui/async_yields_async.stderr
index f1fae6549de..991ad7ae0ae 100644
--- a/src/tools/clippy/tests/ui/async_yields_async.stderr
+++ b/src/tools/clippy/tests/ui/async_yields_async.stderr
@@ -81,8 +81,7 @@ LL |       let _m = async || {
    |  _______________________-
 LL | |         println!("I'm bored");
 LL | |         // Some more stuff
-LL | |
-LL | |         // Finally something to await
+...  |
 LL | |         CustomFutureType
    | |         ^^^^^^^^^^^^^^^^
    | |         |
diff --git a/src/tools/clippy/tests/ui/empty_line_after_outer_attribute.stderr b/src/tools/clippy/tests/ui/empty_line_after_outer_attribute.stderr
index 1b5b00a4a83..b43e6e30da2 100644
--- a/src/tools/clippy/tests/ui/empty_line_after_outer_attribute.stderr
+++ b/src/tools/clippy/tests/ui/empty_line_after_outer_attribute.stderr
@@ -22,8 +22,7 @@ error: found an empty line after an outer attribute. Perhaps you forgot to add a
   --> tests/ui/empty_line_after_outer_attribute.rs:28:1
    |
 LL | / #[crate_type = "lib"]
-LL | |
-LL | |
+...  |
 LL | | fn with_two_newlines() { assert!(true) }
    | |_
 
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 67db33abf65..63e52df8c04 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -4040,7 +4040,7 @@ impl<'test> TestCx<'test> {
         };
 
         let stderr = if force_color_svg {
-            anstyle_svg::Term::new().render_svg(&proc_res.stderr)
+            anstyle_svg::Term::new().min_width_px(730).render_svg(&proc_res.stderr)
         } else if explicit_format {
             proc_res.stderr.clone()
         } else {