You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to `<[T; N] as IntoIterator>::into_iter` in Rust 2021
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2021/IntoIterator-for-arrays.html>
9
+
= note: requested on the command line with `-W array-into-iter`
10
+
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
11
+
|
12
+
LL - for _ in dbg!([1, 2]).into_iter() {}
13
+
LL + for _ in dbg!([1, 2]).iter() {}
14
+
|
15
+
help: or remove `.into_iter()` to iterate by value
16
+
|
17
+
LL - for _ in dbg!([1, 2]).into_iter() {}
18
+
LL + for _ in dbg!([1, 2]) {}
19
+
|
20
+
21
+
warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to `<[T; N] as IntoIterator>::into_iter` in Rust 2021
0 commit comments