Skip to content

Commit 3e0bf94

Browse files
committed
Fix test for multiline span ui display
The compiler output changed in such a way that this test was no longer testing what it was meant to.
1 parent 3cdcdaf commit 3e0bf94

File tree

2 files changed

+51
-12
lines changed

2 files changed

+51
-12
lines changed

Diff for: tests/ui/codemap_tests/huge_multispan_highlight.rs

+28-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
fn main() {
2-
let x = "foo";
2+
let _ = match true {
3+
true => (
34

45

56

@@ -87,5 +88,30 @@ fn main() {
8788

8889

8990

90-
let y = &mut x; //~ ERROR cannot borrow
91+
92+
),
93+
false => "
94+
95+
96+
97+
98+
99+
100+
101+
102+
103+
104+
105+
106+
107+
108+
109+
110+
111+
112+
113+
114+
115+
", //~^^^^^^^^^^^^^^^^^^^^^^ ERROR `match` arms have incompatible types
116+
};
91117
}
+23-10
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
1-
error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
2-
--> $DIR/huge_multispan_highlight.rs:90:13
1+
error[E0308]: `match` arms have incompatible types
2+
--> $DIR/huge_multispan_highlight.rs:93:18
33
|
4-
LL | let y = &mut x;
5-
| ^^^^^^ cannot borrow as mutable
6-
|
7-
help: consider changing this to be mutable
8-
|
9-
LL | let mut x = "foo";
10-
| +++
4+
LL | let _ = match true {
5+
| ---------- `match` arms have incompatible types
6+
LL | true => (
7+
| _________________-
8+
LL | |
9+
LL | |
10+
LL | |
11+
... |
12+
LL | |
13+
LL | | ),
14+
| |_________- this is found to be of type `()`
15+
LL | false => "
16+
| __________________^
17+
LL | |
18+
LL | |
19+
LL | |
20+
... |
21+
LL | |
22+
LL | | ",
23+
| |_________^ expected `()`, found `&str`
1124

1225
error: aborting due to 1 previous error
1326

14-
For more information about this error, try `rustc --explain E0596`.
27+
For more information about this error, try `rustc --explain E0308`.

0 commit comments

Comments
 (0)