Unnamed repository; edit this file 'description' to name the repository.
Auto merge of #17668 - Veykril:incorrect-nevers, r=Veykril
Remove incorrect never! invocations These can crop up when the `Future` related lang items are missing
bors 2024-07-22
parent d092f7d · parent 5806950 · commit 9d86412
-rw-r--r--crates/hir/src/display.rs4
-rw-r--r--crates/hir/src/lib.rs1
2 files changed, 2 insertions, 3 deletions
diff --git a/crates/hir/src/display.rs b/crates/hir/src/display.rs
index a0dbead221..f80ccf84a2 100644
--- a/crates/hir/src/display.rs
+++ b/crates/hir/src/display.rs
@@ -134,9 +134,9 @@ impl HirDisplay for Function {
.as_ref()
.unwrap()
}
- _ => panic!("Async fn ret_type should be impl Future"),
+ _ => &TypeRef::Error,
},
- _ => panic!("Async fn ret_type should be impl Future"),
+ _ => &TypeRef::Error,
}
};
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index 2bd0008c70..bb149a01e8 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -1977,7 +1977,6 @@ impl Function {
return Type::new_with_resolver_inner(db, &resolver, output_eq.ty).into();
}
}
- never!("Async fn ret_type should be impl Future");
None
}