Fix filter_map in minicore

This commit is contained in:
Florian Diebold 2022-03-23 19:47:11 +01:00
parent fa923f9b19
commit e0e6bfb924
2 changed files with 13 additions and 1 deletions

View file

@ -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>
"#,
);
}

View file

@ -518,7 +518,7 @@ pub mod iter {
} }
} }
} }
pub use self::adapters::Take; pub use self::adapters::{Take, FilterMap};
mod sources { mod sources {
mod repeat { mod repeat {