Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/diagnostics/expr.rs')
-rw-r--r--crates/hir-ty/src/diagnostics/expr.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/hir-ty/src/diagnostics/expr.rs b/crates/hir-ty/src/diagnostics/expr.rs
index 5e3d880589..5710641276 100644
--- a/crates/hir-ty/src/diagnostics/expr.rs
+++ b/crates/hir-ty/src/diagnostics/expr.rs
@@ -482,9 +482,8 @@ struct FilterMapNextChecker {
impl FilterMapNextChecker {
fn new(resolver: &hir_def::resolver::Resolver, db: &dyn HirDatabase) -> Self {
// Find and store the FunctionIds for Iterator::filter_map and Iterator::next
- let (next_function_id, filter_map_function_id) = match db
- .lang_item(resolver.krate(), LangItem::IteratorNext)
- .and_then(|it| it.as_function())
+ let (next_function_id, filter_map_function_id) = match LangItem::IteratorNext
+ .resolve_function(db, resolver.krate())
{
Some(next_function_id) => (
Some(next_function_id),