about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTakayuki Maeda <takoyaki0316@gmail.com>2021-09-26 16:18:58 +0900
committerTakayuki Maeda <takoyaki0316@gmail.com>2021-09-26 16:43:47 +0900
commite2aad3fe60ff97fc0d0d1a68a97211918c40b100 (patch)
treed018b8d325aa3899af28a950feed153b9fb2573c
parent0661c2de24521f76a1d014964ad4f60da7d14e46 (diff)
downloadrust-e2aad3fe60ff97fc0d0d1a68a97211918c40b100.tar.gz
rust-e2aad3fe60ff97fc0d0d1a68a97211918c40b100.zip
fix the relevant tests
-rw-r--r--src/test/ui/suggestions/slice-issue-87994.stderr44
-rw-r--r--src/test/ui/traits/negative-impls/negated-auto-traits-error.stderr12
2 files changed, 36 insertions, 20 deletions
diff --git a/src/test/ui/suggestions/slice-issue-87994.stderr b/src/test/ui/suggestions/slice-issue-87994.stderr
index 018f62e783d..5d4923b8676 100644
--- a/src/test/ui/suggestions/slice-issue-87994.stderr
+++ b/src/test/ui/suggestions/slice-issue-87994.stderr
@@ -2,10 +2,7 @@ error[E0277]: the size for values of type `[i32]` cannot be known at compilation
   --> $DIR/slice-issue-87994.rs:3:12
    |
 LL |   for _ in v[1..] {
-   |            ^^^^^^
-   |            |
-   |            expected an implementor of trait `IntoIterator`
-   |            help: consider borrowing here: `&v[1..]`
+   |            ^^^^^^ expected an implementor of trait `IntoIterator`
    |
    = note: the trait bound `[i32]: IntoIterator` is not satisfied
    = note: required because of the requirements on the impl of `IntoIterator` for `[i32]`
@@ -14,15 +11,18 @@ note: required by `into_iter`
    |
 LL |     fn into_iter(self) -> Self::IntoIter;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+help: consider borrowing here
+   |
+LL |   for _ in &v[1..] {
+   |            ~~~~~~~
+LL |   for _ in &mut v[1..] {
+   |            ~~~~~~~~~~~
 
 error[E0277]: `[i32]` is not an iterator
   --> $DIR/slice-issue-87994.rs:3:12
    |
 LL |   for _ in v[1..] {
-   |            ^^^^^^
-   |            |
-   |            expected an implementor of trait `IntoIterator`
-   |            help: consider borrowing here: `&v[1..]`
+   |            ^^^^^^ expected an implementor of trait `IntoIterator`
    |
    = note: the trait bound `[i32]: IntoIterator` is not satisfied
    = note: required because of the requirements on the impl of `IntoIterator` for `[i32]`
@@ -31,15 +31,18 @@ note: required by `into_iter`
    |
 LL |     fn into_iter(self) -> Self::IntoIter;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+help: consider borrowing here
+   |
+LL |   for _ in &v[1..] {
+   |            ~~~~~~~
+LL |   for _ in &mut v[1..] {
+   |            ~~~~~~~~~~~
 
 error[E0277]: the size for values of type `[K]` cannot be known at compilation time
   --> $DIR/slice-issue-87994.rs:11:13
    |
 LL |   for i2 in v2[1..] {
-   |             ^^^^^^^
-   |             |
-   |             expected an implementor of trait `IntoIterator`
-   |             help: consider borrowing here: `&v2[1..]`
+   |             ^^^^^^^ expected an implementor of trait `IntoIterator`
    |
    = note: the trait bound `[K]: IntoIterator` is not satisfied
    = note: required because of the requirements on the impl of `IntoIterator` for `[K]`
@@ -48,15 +51,18 @@ note: required by `into_iter`
    |
 LL |     fn into_iter(self) -> Self::IntoIter;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+help: consider borrowing here
+   |
+LL |   for i2 in &v2[1..] {
+   |             ~~~~~~~~
+LL |   for i2 in &mut v2[1..] {
+   |             ~~~~~~~~~~~~
 
 error[E0277]: `[K]` is not an iterator
   --> $DIR/slice-issue-87994.rs:11:13
    |
 LL |   for i2 in v2[1..] {
-   |             ^^^^^^^
-   |             |
-   |             expected an implementor of trait `IntoIterator`
-   |             help: consider borrowing here: `&v2[1..]`
+   |             ^^^^^^^ expected an implementor of trait `IntoIterator`
    |
    = note: the trait bound `[K]: IntoIterator` is not satisfied
    = note: required because of the requirements on the impl of `IntoIterator` for `[K]`
@@ -65,6 +71,12 @@ note: required by `into_iter`
    |
 LL |     fn into_iter(self) -> Self::IntoIter;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+help: consider borrowing here
+   |
+LL |   for i2 in &v2[1..] {
+   |             ~~~~~~~~
+LL |   for i2 in &mut v2[1..] {
+   |             ~~~~~~~~~~~~
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/traits/negative-impls/negated-auto-traits-error.stderr b/src/test/ui/traits/negative-impls/negated-auto-traits-error.stderr
index 790e2a81c3a..ef6a30a2483 100644
--- a/src/test/ui/traits/negative-impls/negated-auto-traits-error.stderr
+++ b/src/test/ui/traits/negative-impls/negated-auto-traits-error.stderr
@@ -102,10 +102,8 @@ error[E0277]: `main::TestType` cannot be sent between threads safely
   --> $DIR/negated-auto-traits-error.rs:66:13
    |
 LL |     is_sync(Outer2(TestType));
-   |     ------- ^^^^^^^^^^^^^^^^
-   |     |       |
-   |     |       expected an implementor of trait `Sync`
-   |     |       help: consider borrowing here: `&Outer2(TestType)`
+   |     ------- ^^^^^^^^^^^^^^^^ expected an implementor of trait `Sync`
+   |     |
    |     required by a bound introduced by this call
    |
    = note: the trait bound `main::TestType: Sync` is not satisfied
@@ -119,6 +117,12 @@ note: required by a bound in `is_sync`
    |
 LL | fn is_sync<T: Sync>(_: T) {}
    |               ^^^^ required by this bound in `is_sync`
+help: consider borrowing here
+   |
+LL |     is_sync(&Outer2(TestType));
+   |             ~~~~~~~~~~~~~~~~~
+LL |     is_sync(&mut Outer2(TestType));
+   |             ~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 7 previous errors