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
let suggestion_source = r#"[1, 2, 3].into_iter().for_each(|n| { *n; });
2648
+
"#;
2649
+
2650
+
let long_title1 ="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";
2651
+
let long_title2 = "for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>";
2652
+
let long_title3 = "or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value";
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
2686
+
--> lint_example.rs:3:11
2687
+
|
2688
+
3 | [1, 2, 3].into_iter().for_each(|n| { *n; });
2689
+
| ^^^^^^^^^
2690
+
|
2691
+
= warning: this changes meaning in Rust 2021
2692
+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
2693
+
= note: `#[warn(array_into_iter)]` on by default
2694
+
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
2695
+
|
2696
+
3 - [1, 2, 3].into_iter().for_each(|n| { *n; });
2697
+
3 + [1, 2, 3].iter().for_each(|n| { *n; });
2698
+
|
2699
+
help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value
let suggestion_source = r#"[1, 2, 3].into_iter().for_each(|n| { *n; });
2716
+
"#;
2717
+
2718
+
let long_title1 ="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";
2719
+
let long_title2 = "for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>";
2720
+
let long_title3 = "or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value";
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
2754
+
--> lint_example.rs:3:11
2755
+
|
2756
+
3 | [1, 2, 3].into_iter().for_each(|n| { *n; });
2757
+
| ^^^^^^^^^
2758
+
|
2759
+
= warning: this changes meaning in Rust 2021
2760
+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
2761
+
= note: `#[warn(array_into_iter)]` on by default
2762
+
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
2763
+
|
2764
+
3 - [1, 2, 3].into_iter().for_each(|n| { *n; });
2765
+
3 + [1, 2, 3].iter().for_each(|n| { *n; });
2766
+
|
2767
+
help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value
0 commit comments