We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa26992 commit d9dedbdCopy full SHA for d9dedbd
crates/ide-diagnostics/src/handlers/replace_filter_map_next_with_find_map.rs
@@ -80,6 +80,21 @@ fn foo() {
80
);
81
}
82
83
+ #[test]
84
+ fn replace_filter_map_next_dont_work_for_not_sized_issues_16596() {
85
+ check_diagnostics(
86
+ r#"
87
+//- minicore: iterators
88
+fn foo() {
89
+ let mut j = [0].into_iter();
90
+ let i: &mut dyn Iterator<Item = i32> = &mut j;
91
+ let dummy_fn = |v| (v > 0).then_some(v + 1);
92
+ let _res = i.filter_map(dummy_fn).next();
93
+}
94
+"#,
95
+ );
96
+ }
97
+
98
#[test]
99
fn replace_filter_map_next_with_find_map_no_diagnostic_without_next() {
100
check_diagnostics(
0 commit comments