diff options
| author | Takayuki Maeda <takoyaki0316@gmail.com> | 2021-09-27 00:30:39 +0900 |
|---|---|---|
| committer | Takayuki Maeda <takoyaki0316@gmail.com> | 2021-09-27 00:30:39 +0900 |
| commit | 620f480e64cb98a108d735ea4f53bb24acfc176a (patch) | |
| tree | 97509e93f5b64acd926dc365696449ca114779a5 /src/test/ui/issues | |
| parent | e2aad3fe60ff97fc0d0d1a68a97211918c40b100 (diff) | |
better suggestions
Diffstat (limited to 'src/test/ui/issues')
| -rw-r--r-- | src/test/ui/issues/issue-20605.stderr | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/test/ui/issues/issue-20605.stderr b/src/test/ui/issues/issue-20605.stderr index ce3ab6b5998..5a67aead75a 100644 --- a/src/test/ui/issues/issue-20605.stderr +++ b/src/test/ui/issues/issue-20605.stderr @@ -2,10 +2,7 @@ error[E0277]: the size for values of type `dyn Iterator<Item = &'a mut u8>` cann --> $DIR/issue-20605.rs:2:17 | LL | for item in *things { *item = 0 } - | ^^^^^^^ - | | - | expected an implementor of trait `IntoIterator` - | help: consider mutably borrowing here: `&mut *things` + | ^^^^^^^ expected an implementor of trait `IntoIterator` | = note: the trait bound `dyn Iterator<Item = &'a mut u8>: IntoIterator` is not satisfied = note: required because of the requirements on the impl of `IntoIterator` for `dyn Iterator<Item = &'a mut u8>` @@ -14,6 +11,10 @@ note: required by `into_iter` | LL | fn into_iter(self) -> Self::IntoIter; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +help: consider mutably borrowing here + | +LL | for item in &mut *things { *item = 0 } + | ++++ error: aborting due to previous error |
