aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/body
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-02-05 18:26:51 +0000
committerGitHub <[email protected]>2021-02-05 18:26:51 +0000
commit4e86aee60b7b42263012461d527755a17fd1226f (patch)
tree8c2dfa181f07eee0be7b3b2684d83ed0df82bb3b /crates/hir_def/src/body
parent80ab753d7e0bf59b81df317d6ddda43cb919ec83 (diff)
parentc312ab51d0d0bcee9514e08e6fafea26d061ea67 (diff)
Merge #7575
7575: Fix resolution of `self` module within blocks r=jonas-schievink a=jonas-schievink bors r+ Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/hir_def/src/body')
-rw-r--r--crates/hir_def/src/body/tests/block.rs16
1 files changed, 10 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..b599c6269 100644
--- a/crates/hir_def/src/body/tests/block.rs
+++ b/crates/hir_def/src/body/tests/block.rs
@@ -26,22 +26,26 @@ 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;
35 use super::Struct as SuperStruct;
34 $0 36 $0
35} 37}
36"#, 38"#,
37 expect![[r#" 39 expect![[r#"
38 block scope 40 block scope
39 CrateStruct: t v 41 CrateStruct: t
40 SelfStruct: t v 42 PlainStruct: t v
41 Struct: t v 43 SelfStruct: t
44 Struct: v
45 SuperStruct: _
42 46
43 crate 47 crate
44 Struct: t v 48 Struct: t
45 outer: v 49 outer: v
46 "#]], 50 "#]],
47 ); 51 );