]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/suggestions/for-i-in-vec.stderr
Auto merge of #86492 - hyd-dev:no-mangle-method, r=petrochenkov
[rust.git] / src / test / ui / suggestions / for-i-in-vec.stderr
index 011fdf34c28b543cf60d4d4a93fde4e36d6ad089..c39363f762bdd8ee26aab0d62fd8e5e94f905446 100644 (file)
@@ -7,7 +7,7 @@ LL |         for _ in self.v {
 help: consider iterating over a slice of the `Vec<u32>`'s content
    |
 LL |         for _ in &self.v {
-   |                  ^
+   |                  +
 
 error[E0507]: cannot move out of `self.h` which is behind a shared reference
   --> $DIR/for-i-in-vec.rs:13:18
@@ -18,8 +18,19 @@ LL |         for _ in self.h {
 help: consider iterating over a slice of the `HashMap<i32, i32>`'s content
    |
 LL |         for _ in &self.h {
-   |                  ^
+   |                  +
 
-error: aborting due to 2 previous errors
+error[E0507]: cannot move out of a shared reference
+  --> $DIR/for-i-in-vec.rs:21:19
+   |
+LL |     for loader in *LOADERS {
+   |                   ^^^^^^^^ move occurs because value has type `Vec<&u8>`, which does not implement the `Copy` trait
+   |
+help: consider iterating over a slice of the `Vec<&u8>`'s content
+   |
+LL |     for loader in &*LOADERS {
+   |                   +
+
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0507`.