Skip to content

Commit e0e6bfb

Browse files
committed
Fix filter_map in minicore
1 parent fa923f9 commit e0e6bfb

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

crates/hir_ty/src/tests/method_resolution.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,3 +1750,15 @@ pub fn test() {
17501750
"#,
17511751
);
17521752
}
1753+
1754+
#[test]
1755+
fn resolve_minicore_iterator() {
1756+
check_types(
1757+
r#"
1758+
//- minicore: iterators, sized
1759+
fn foo() {
1760+
let m = core::iter::repeat(()).filter_map(|()| Some(92)).next();
1761+
} //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Option<i32>
1762+
"#,
1763+
);
1764+
}

crates/test_utils/src/minicore.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ pub mod iter {
518518
}
519519
}
520520
}
521-
pub use self::adapters::Take;
521+
pub use self::adapters::{Take, FilterMap};
522522

523523
mod sources {
524524
mod repeat {

0 commit comments

Comments
 (0)