about summary refs log tree commit diff
path: root/tests/ui/array-slice-vec
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-11-24 21:40:54 +0000
committerbors <bors@rust-lang.org>2023-11-24 21:40:54 +0000
commit37b2813a7be580ef59048a6bd08444c79e5cc97f (patch)
treeca128703ba533ad8f1b98e29c4bfe297d7914554 /tests/ui/array-slice-vec
parent0f696e555f180bad960fdea8339c3a9b9edf844f (diff)
parentc73d392a01f26c8f83102b12e4d66d5a8d1f558b (diff)
downloadrust-37b2813a7be580ef59048a6bd08444c79e5cc97f.tar.gz
rust-37b2813a7be580ef59048a6bd08444c79e5cc97f.zip
Auto merge of #118138 - Nilstrieb:one-previous-error, r=WaffleLapkin
Fixes error count display is different when there's only one error left

Supersedes #114759

### What did I do?

I did the small change in `rustc_errors` by hand. Then I did the other changes in `/compiler` by hand, those were just find replace on `*.rs` in the workspace. The changes in run-make are find replace for `run-make` in the workspace.

All other changes are blessed using `x test TEST --bless`. I blessed the tests that were blessed in #114759.

### how to review this nightmare

ping bors with an `r+`. You should check that my logic is sound and maybe quickly scroll through the diff, but fully verifying it seems fairly hard to impossible. I did my best to do this correctly.

Thank you `@adrianEffe` for bringing this up and your initial implementation.

cc `@flip1995,` you said you want to do a subtree sync asap
cc `@RalfJung` maybe you want to do a quick subtree sync afterwards as well for Miri

r? `@WaffleLapkin`
Diffstat (limited to 'tests/ui/array-slice-vec')
-rw-r--r--tests/ui/array-slice-vec/array_const_index-0.stderr2
-rw-r--r--tests/ui/array-slice-vec/array_const_index-1.stderr2
-rw-r--r--tests/ui/array-slice-vec/match_arr_unknown_len.stderr2
-rw-r--r--tests/ui/array-slice-vec/slice-mut-2.stderr2
-rw-r--r--tests/ui/array-slice-vec/slice-mut.stderr2
-rw-r--r--tests/ui/array-slice-vec/slice-to-vec-comparison.stderr2
-rw-r--r--tests/ui/array-slice-vec/vec-macro-with-comma-only.stderr2
-rw-r--r--tests/ui/array-slice-vec/vec-mut-iter-borrow.stderr2
-rw-r--r--tests/ui/array-slice-vec/vec-res-add.stderr2
-rw-r--r--tests/ui/array-slice-vec/vector-no-ann.stderr2
10 files changed, 10 insertions, 10 deletions
diff --git a/tests/ui/array-slice-vec/array_const_index-0.stderr b/tests/ui/array-slice-vec/array_const_index-0.stderr
index 3b92cc76687..d16e8d50dfd 100644
--- a/tests/ui/array-slice-vec/array_const_index-0.stderr
+++ b/tests/ui/array-slice-vec/array_const_index-0.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of constant value failed
 LL | const B: i32 = (&A)[1];
    |                ^^^^^^^ index out of bounds: the length is 0 but the index is 1
 
-error: aborting due to previous error
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/array-slice-vec/array_const_index-1.stderr b/tests/ui/array-slice-vec/array_const_index-1.stderr
index 591db268a99..f9ba2f13911 100644
--- a/tests/ui/array-slice-vec/array_const_index-1.stderr
+++ b/tests/ui/array-slice-vec/array_const_index-1.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of constant value failed
 LL | const B: i32 = A[1];
    |                ^^^^ index out of bounds: the length is 0 but the index is 1
 
-error: aborting due to previous error
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/array-slice-vec/match_arr_unknown_len.stderr b/tests/ui/array-slice-vec/match_arr_unknown_len.stderr
index 5e531a993c6..3ed0d6bdf3a 100644
--- a/tests/ui/array-slice-vec/match_arr_unknown_len.stderr
+++ b/tests/ui/array-slice-vec/match_arr_unknown_len.stderr
@@ -7,6 +7,6 @@ LL |         [1, 2] => true,
    = note: expected array `[u32; 2]`
               found array `[u32; N]`
 
-error: aborting due to previous error
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/array-slice-vec/slice-mut-2.stderr b/tests/ui/array-slice-vec/slice-mut-2.stderr
index c33919c41cd..8cc2c6e0397 100644
--- a/tests/ui/array-slice-vec/slice-mut-2.stderr
+++ b/tests/ui/array-slice-vec/slice-mut-2.stderr
@@ -9,6 +9,6 @@ help: consider changing this to be a mutable reference
 LL |     let x: &[isize] = &mut [1, 2, 3, 4, 5];
    |                        +++
 
-error: aborting due to previous error
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/array-slice-vec/slice-mut.stderr b/tests/ui/array-slice-vec/slice-mut.stderr
index 7d34defc1d5..288031e505c 100644
--- a/tests/ui/array-slice-vec/slice-mut.stderr
+++ b/tests/ui/array-slice-vec/slice-mut.stderr
@@ -9,6 +9,6 @@ LL |     let y: &mut[_] = &x[2..4];
    = note: expected mutable reference `&mut [_]`
                       found reference `&[isize]`
 
-error: aborting due to previous error
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/array-slice-vec/slice-to-vec-comparison.stderr b/tests/ui/array-slice-vec/slice-to-vec-comparison.stderr
index 47008e1d999..7e5b8afea24 100644
--- a/tests/ui/array-slice-vec/slice-to-vec-comparison.stderr
+++ b/tests/ui/array-slice-vec/slice-to-vec-comparison.stderr
@@ -7,6 +7,6 @@ LL |     a > b;
    = note: expected reference `&[_; 0]`
               found reference `&Vec<u8>`
 
-error: aborting due to previous error
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/array-slice-vec/vec-macro-with-comma-only.stderr b/tests/ui/array-slice-vec/vec-macro-with-comma-only.stderr
index ec4a001f4d0..b3f953af6d2 100644
--- a/tests/ui/array-slice-vec/vec-macro-with-comma-only.stderr
+++ b/tests/ui/array-slice-vec/vec-macro-with-comma-only.stderr
@@ -6,5 +6,5 @@ LL |     vec![,];
    |
    = note: while trying to match end of macro
 
-error: aborting due to previous error
+error: aborting due to 1 previous error
 
diff --git a/tests/ui/array-slice-vec/vec-mut-iter-borrow.stderr b/tests/ui/array-slice-vec/vec-mut-iter-borrow.stderr
index 679fd899773..d9343140fb1 100644
--- a/tests/ui/array-slice-vec/vec-mut-iter-borrow.stderr
+++ b/tests/ui/array-slice-vec/vec-mut-iter-borrow.stderr
@@ -9,6 +9,6 @@ LL |     for x in &mut xs {
 LL |         xs.push(1)
    |         ^^ second mutable borrow occurs here
 
-error: aborting due to previous error
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/array-slice-vec/vec-res-add.stderr b/tests/ui/array-slice-vec/vec-res-add.stderr
index 7511271361d..cf5796f7e4a 100644
--- a/tests/ui/array-slice-vec/vec-res-add.stderr
+++ b/tests/ui/array-slice-vec/vec-res-add.stderr
@@ -6,6 +6,6 @@ LL |     let k = i + j;
    |             |
    |             Vec<R>
 
-error: aborting due to previous error
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/array-slice-vec/vector-no-ann.stderr b/tests/ui/array-slice-vec/vector-no-ann.stderr
index 619417a73c9..24b6abfb342 100644
--- a/tests/ui/array-slice-vec/vector-no-ann.stderr
+++ b/tests/ui/array-slice-vec/vector-no-ann.stderr
@@ -9,6 +9,6 @@ help: consider giving `_foo` an explicit type, where the type for type parameter
 LL |     let _foo: Vec<T> = Vec::new();
    |             ++++++++
 
-error: aborting due to previous error
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0282`.