aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/body/tests
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2021-02-05 18:24:03 +0000
committerJonas Schievink <[email protected]>2021-02-05 18:24:03 +0000
commit997bd97b77e0cacf7eb8e466071e416492cc24b3 (patch)
tree903383bc4aec9ff57974289a1dce5bcbc7c37fb1 /crates/hir_def/src/body/tests
parent80ab753d7e0bf59b81df317d6ddda43cb919ec83 (diff)
Fix resolution of `self` module within blocks
Diffstat (limited to 'crates/hir_def/src/body/tests')
-rw-r--r--crates/hir_def/src/body/tests/block.rs14
1 files changed, 8 insertions, 6 deletions
diff --git a/crates/hir_def/src/body/tests/block.rs b/crates/hir_def/src/body/tests/block.rs
index 062560a70..e688c0989 100644
--- a/crates/hir_def/src/body/tests/block.rs
+++ b/crates/hir_def/src/body/tests/block.rs
@@ -26,9 +26,10 @@ fn outer() {
26fn use_from_crate() { 26fn use_from_crate() {
27 check_at( 27 check_at(
28 r#" 28 r#"
29struct Struct; 29struct Struct {}
30fn outer() { 30fn outer() {
31 use Struct; 31 fn Struct() {}
32 use Struct as PlainStruct;
32 use crate::Struct as CrateStruct; 33 use crate::Struct as CrateStruct;
33 use self::Struct as SelfStruct; 34 use self::Struct as SelfStruct;
34 $0 35 $0
@@ -36,12 +37,13 @@ fn outer() {
36"#, 37"#,
37 expect![[r#" 38 expect![[r#"
38 block scope 39 block scope
39 CrateStruct: t v 40 CrateStruct: t
40 SelfStruct: t v 41 PlainStruct: t v
41 Struct: t v 42 SelfStruct: t
43 Struct: v
42 44
43 crate 45 crate
44 Struct: t v 46 Struct: t
45 outer: v 47 outer: v
46 "#]], 48 "#]],
47 ); 49 );