Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--crates/hir_ty/src/tests/method_resolution.rs12
-rw-r--r--crates/test_utils/src/minicore.rs2
2 files changed, 13 insertions, 1 deletions
diff --git a/crates/hir_ty/src/tests/method_resolution.rs b/crates/hir_ty/src/tests/method_resolution.rs
index 95957f6235..011347e5c4 100644
--- a/crates/hir_ty/src/tests/method_resolution.rs
+++ b/crates/hir_ty/src/tests/method_resolution.rs
@@ -1750,3 +1750,15 @@ pub fn test() {
"#,
);
}
+
+#[test]
+fn resolve_minicore_iterator() {
+ check_types(
+ r#"
+//- minicore: iterators, sized
+fn foo() {
+ let m = core::iter::repeat(()).filter_map(|()| Some(92)).next();
+} //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Option<i32>
+"#,
+ );
+}
diff --git a/crates/test_utils/src/minicore.rs b/crates/test_utils/src/minicore.rs
index 5c63e27879..8474014a2c 100644
--- a/crates/test_utils/src/minicore.rs
+++ b/crates/test_utils/src/minicore.rs
@@ -518,7 +518,7 @@ pub mod iter {
}
}
}
- pub use self::adapters::Take;
+ pub use self::adapters::{Take, FilterMap};
mod sources {
mod repeat {