Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/tests/regression.rs')
-rw-r--r--crates/hir-ty/src/tests/regression.rs43
1 files changed, 43 insertions, 0 deletions
diff --git a/crates/hir-ty/src/tests/regression.rs b/crates/hir-ty/src/tests/regression.rs
index 4f1480c393..3b5b4e4fa5 100644
--- a/crates/hir-ty/src/tests/regression.rs
+++ b/crates/hir-ty/src/tests/regression.rs
@@ -2363,6 +2363,7 @@ fn test() {
}
"#,
expect![[r#"
+ 46..49 'Foo': Foo<N>
93..97 'self': Foo<N>
108..125 '{ ... }': usize
118..119 'N': usize
@@ -2645,3 +2646,45 @@ where
"#,
);
}
+
+#[test]
+fn issue_21560() {
+ check_no_mismatches(
+ r#"
+mod bindings {
+ use super::*;
+ pub type HRESULT = i32;
+}
+use bindings::*;
+
+
+mod error {
+ use super::*;
+ pub fn nonzero_hresult(hr: HRESULT) -> crate::HRESULT {
+ hr
+ }
+}
+pub use error::*;
+
+mod hresult {
+ use super::*;
+ pub struct HRESULT(pub i32);
+}
+pub use hresult::HRESULT;
+
+ "#,
+ );
+}
+
+#[test]
+fn regression_21577() {
+ check_no_mismatches(
+ r#"
+pub trait FilterT<F: FilterT<F, V = Self::V> = Self> {
+ type V;
+
+ fn foo() {}
+}
+ "#,
+ );
+}