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 currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added.
1
+
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.
2
2
--> $DIR/into-iter-on-arrays-2018.rs:14:34
3
3
|
4
4
LL | let _: Iter<'_, i32> = array.into_iter();
5
-
| ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter`
5
+
| ^^^^^^^^^
6
6
|
7
7
= note: `#[warn(array_into_iter)]` on by default
8
8
= warning: this changes meaning in Rust 2021
9
9
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
10
+
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
11
+
|
12
+
LL | let _: Iter<'_, i32> = array.iter();
13
+
| ^^^^
14
+
help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value
15
+
|
16
+
LL | let _: Iter<'_, i32> = IntoIterator::into_iter(array);
17
+
| ^^^^^^^^^^^^^^^^^^^^^^^^ ^
10
18
11
-
warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added.
19
+
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.
12
20
--> $DIR/into-iter-on-arrays-2018.rs:18:44
13
21
|
14
22
LL | let _: Iter<'_, i32> = Box::new(array).into_iter();
15
-
| ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter`
23
+
| ^^^^^^^^^
16
24
|
17
25
= warning: this changes meaning in Rust 2021
18
26
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
27
+
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
28
+
|
29
+
LL | let _: Iter<'_, i32> = Box::new(array).iter();
30
+
| ^^^^
31
+
help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value
32
+
|
33
+
LL | let _: Iter<'_, i32> = IntoIterator::into_iter(Box::new(array));
0 commit comments