diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2024-03-03 19:18:25 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2024-03-18 16:25:36 +0000 |
| commit | 3e0bf9498a662c3c67f78d583d64a8f9e76ef511 (patch) | |
| tree | 9661a3ab8594772212e83fed15198baff2861aeb | |
| parent | 3cdcdaf31b45f8045164aae9604573d23091970b (diff) | |
| download | rust-3e0bf9498a662c3c67f78d583d64a8f9e76ef511.tar.gz rust-3e0bf9498a662c3c67f78d583d64a8f9e76ef511.zip | |
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.
| -rw-r--r-- | tests/ui/codemap_tests/huge_multispan_highlight.rs | 30 | ||||
| -rw-r--r-- | tests/ui/codemap_tests/huge_multispan_highlight.stderr | 33 |
2 files changed, 51 insertions, 12 deletions
diff --git a/tests/ui/codemap_tests/huge_multispan_highlight.rs b/tests/ui/codemap_tests/huge_multispan_highlight.rs index 623c59081d0..9e445f73ec7 100644 --- a/tests/ui/codemap_tests/huge_multispan_highlight.rs +++ b/tests/ui/codemap_tests/huge_multispan_highlight.rs @@ -1,5 +1,6 @@ fn main() { - let x = "foo"; + let _ = match true { + true => ( @@ -87,5 +88,30 @@ fn main() { - let y = &mut x; //~ ERROR cannot borrow + + ), + false => " + + + + + + + + + + + + + + + + + + + + + + ", //~^^^^^^^^^^^^^^^^^^^^^^ ERROR `match` arms have incompatible types + }; } diff --git a/tests/ui/codemap_tests/huge_multispan_highlight.stderr b/tests/ui/codemap_tests/huge_multispan_highlight.stderr index d2923875c94..6c5f965099d 100644 --- a/tests/ui/codemap_tests/huge_multispan_highlight.stderr +++ b/tests/ui/codemap_tests/huge_multispan_highlight.stderr @@ -1,14 +1,27 @@ -error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable - --> $DIR/huge_multispan_highlight.rs:90:13 +error[E0308]: `match` arms have incompatible types + --> $DIR/huge_multispan_highlight.rs:93:18 | -LL | let y = &mut x; - | ^^^^^^ cannot borrow as mutable - | -help: consider changing this to be mutable - | -LL | let mut x = "foo"; - | +++ +LL | let _ = match true { + | ---------- `match` arms have incompatible types +LL | true => ( + | _________________- +LL | | +LL | | +LL | | +... | +LL | | +LL | | ), + | |_________- this is found to be of type `()` +LL | false => " + | __________________^ +LL | | +LL | | +LL | | +... | +LL | | +LL | | ", + | |_________^ expected `()`, found `&str` error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0596`. +For more information about this error, try `rustc --explain E0308`. |
