2021-10-03 06:53:02 +00:00
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
2021-04-14 19:05:24 +00:00
--> $DIR/into-iter-on-arrays-2018.rs:14:34
2021-04-12 23:07:28 +00:00
|
LL | let _: Iter<'_, i32> = array.into_iter();
2021-05-25 15:56:19 +00:00
| ^^^^^^^^^
2021-04-12 23:07:28 +00:00
|
2021-06-15 15:16:21 +00:00
= warning: this changes meaning in Rust 2021
2021-08-09 15:45:01 +00:00
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
2022-09-18 15:55:36 +00:00
= note: `#[warn(array_into_iter)]` on by default
2021-05-25 15:56:19 +00:00
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
LL | let _: Iter<'_, i32> = array.iter();
2021-06-22 02:07:19 +00:00
| ~~~~
2021-05-25 15:56:19 +00:00
help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value
|
LL | let _: Iter<'_, i32> = IntoIterator::into_iter(array);
2021-06-22 02:07:19 +00:00
| ++++++++++++++++++++++++ ~
2021-04-12 23:07:28 +00:00
2021-10-03 06:53:02 +00:00
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
2021-04-14 19:05:24 +00:00
--> $DIR/into-iter-on-arrays-2018.rs:18:44
2021-04-13 19:37:19 +00:00
|
LL | let _: Iter<'_, i32> = Box::new(array).into_iter();
2021-08-30 21:42:48 +00:00
| ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter`
2021-04-13 19:37:19 +00:00
|
2021-06-15 15:16:21 +00:00
= warning: this changes meaning in Rust 2021
2021-08-09 15:45:01 +00:00
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
2021-08-30 21:42:48 +00:00
2021-10-03 06:53:02 +00:00
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
2021-08-30 21:42:48 +00:00
--> $DIR/into-iter-on-arrays-2018.rs:22:43
2021-05-25 15:56:19 +00:00
|
2021-08-30 21:42:48 +00:00
LL | let _: Iter<'_, i32> = Rc::new(array).into_iter();
| ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter`
|
= warning: this changes meaning in Rust 2021
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
2021-10-03 06:53:02 +00:00
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
2021-08-30 21:42:48 +00:00
--> $DIR/into-iter-on-arrays-2018.rs:25:41
2021-05-25 15:56:19 +00:00
|
2021-08-30 21:42:48 +00:00
LL | let _: Iter<'_, i32> = Array(array).into_iter();
| ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter`
|
= warning: this changes meaning in Rust 2021
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
2021-04-13 19:37:19 +00:00
2021-10-03 06:53:02 +00:00
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
2021-08-30 21:42:48 +00:00
--> $DIR/into-iter-on-arrays-2018.rs:32:24
2021-05-25 17:15:48 +00:00
|
LL | for _ in [1, 2, 3].into_iter() {}
| ^^^^^^^^^
|
2021-06-25 17:26:31 +00:00
= warning: this changes meaning in Rust 2021
2021-08-09 15:45:01 +00:00
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
2021-05-25 17:15:48 +00:00
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
LL | for _ in [1, 2, 3].iter() {}
2021-06-22 02:07:19 +00:00
| ~~~~
2021-05-25 17:15:48 +00:00
help: or remove `.into_iter()` to iterate by value
|
2021-06-22 02:07:19 +00:00
LL - for _ in [1, 2, 3].into_iter() {}
LL + for _ in [1, 2, 3] {}
2022-06-08 17:34:57 +00:00
|
2021-05-25 17:15:48 +00:00
2021-08-30 21:42:48 +00:00
warning: 5 warnings emitted
2021-04-12 23:07:28 +00:00