1
Fork 0

fix the relevant tests

This commit is contained in:
Takayuki Maeda 2021-09-26 16:18:58 +09:00
parent 0661c2de24
commit e2aad3fe60
2 changed files with 36 additions and 20 deletions

View file

@ -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

View file

@ -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