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.rs18
1 files changed, 17 insertions, 1 deletions
diff --git a/crates/hir-ty/src/tests/regression.rs b/crates/hir-ty/src/tests/regression.rs
index 7c79393e65..75d32035d0 100644
--- a/crates/hir-ty/src/tests/regression.rs
+++ b/crates/hir-ty/src/tests/regression.rs
@@ -725,7 +725,7 @@ fn issue_4885() {
138..146 'bar(key)': impl Future<Output = <K as Foo<R>>::Bar>
142..145 'key': &'? K
162..165 'key': &'? K
- 224..227 '{ }': ()
+ 224..227 '{ }': impl Future<Output = <K as Foo<R>>::Bar>
"#]],
);
}
@@ -2506,3 +2506,19 @@ fn main() {
"#,
);
}
+
+#[test]
+fn module_inside_block() {
+ check_types(
+ r#"
+fn foo() {
+ mod my_mod {
+ pub type Bool = bool;
+ }
+
+ let _: my_mod::Bool;
+ // ^ bool
+}
+ "#,
+ );
+}