mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
Fix filter_map in minicore
This commit is contained in:
parent
fa923f9b19
commit
e0e6bfb924
2 changed files with 13 additions and 1 deletions
|
@ -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>
|
||||||
|
"#,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue