]> git.proxmox.com Git - rustc.git/blob - src/test/ui/iterators/into-iter-on-arrays-2018.stderr
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / iterators / into-iter-on-arrays-2018.stderr
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 --> $DIR/into-iter-on-arrays-2018.rs:14:34
3 |
4 LL | let _: Iter<'_, i32> = array.into_iter();
5 | ^^^^^^^^^
6 |
7 = note: `#[warn(array_into_iter)]` on by default
8 = warning: this changes meaning in Rust 2021
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 | ^^^^^^^^^^^^^^^^^^^^^^^^ ^
18
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.
20 --> $DIR/into-iter-on-arrays-2018.rs:18:44
21 |
22 LL | let _: Iter<'_, i32> = Box::new(array).into_iter();
23 | ^^^^^^^^^
24 |
25 = warning: this changes meaning in Rust 2021
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));
34 | ^^^^^^^^^^^^^^^^^^^^^^^^ ^
35
36 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.
37 --> $DIR/into-iter-on-arrays-2018.rs:29:24
38 |
39 LL | for _ in [1, 2, 3].into_iter() {}
40 | ^^^^^^^^^
41 |
42 = warning: this changes meaning in Rust 2021
43 = note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
44 help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
45 |
46 LL | for _ in [1, 2, 3].iter() {}
47 | ^^^^
48 help: or remove `.into_iter()` to iterate by value
49 |
50 LL | for _ in [1, 2, 3] {}
51 | --
52
53 warning: 3 warnings emitted
54