Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/tests/diagnostics.rs')
-rw-r--r--crates/hir-ty/src/tests/diagnostics.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/hir-ty/src/tests/diagnostics.rs b/crates/hir-ty/src/tests/diagnostics.rs
index 80f92eaf43..119de7f050 100644
--- a/crates/hir-ty/src/tests/diagnostics.rs
+++ b/crates/hir-ty/src/tests/diagnostics.rs
@@ -136,3 +136,20 @@ impl Trait for () {
"#,
);
}
+
+#[test]
+fn no_mismatches_with_unresolved_projections() {
+ check_no_mismatches(
+ r#"
+// `Thing` is `{unknown}`
+fn create() -> Option<(i32, Thing)> {
+ Some((69420, Thing))
+}
+
+fn consume() -> Option<()> {
+ let (number, thing) = create()?;
+ Some(())
+}
+"#,
+ );
+}