aboutsummaryrefslogtreecommitdiff
path: root/crates/hir
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-03-21 00:29:15 +0000
committerGitHub <[email protected]>2021-03-21 00:29:15 +0000
commita0ed87ff56e83eb03910b58a9cb80c35c5639338 (patch)
tree9360702f2aaf0c4672a9ed74c51604a8353662a0 /crates/hir
parent787bd3c5516d250245f6070308d689311b638fbe (diff)
parent64957acb5f359763395a54e314d1f5d5cfc6ccf3 (diff)
Merge #8127
8127: Add label completion r=Veykril a=Veykril Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/hir')
-rw-r--r--crates/hir/src/lib.rs1
-rw-r--r--crates/hir/src/semantics.rs4
2 files changed, 5 insertions, 0 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index 30e577671..e34be7e42 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -2199,6 +2199,7 @@ pub enum ScopeDef {
2199 ImplSelfType(Impl), 2199 ImplSelfType(Impl),
2200 AdtSelfType(Adt), 2200 AdtSelfType(Adt),
2201 Local(Local), 2201 Local(Local),
2202 Label(Label),
2202 Unknown, 2203 Unknown,
2203} 2204}
2204 2205
diff --git a/crates/hir/src/semantics.rs b/crates/hir/src/semantics.rs
index 15651bb22..1198e3f0b 100644
--- a/crates/hir/src/semantics.rs
+++ b/crates/hir/src/semantics.rs
@@ -839,6 +839,10 @@ impl<'a> SemanticsScope<'a> {
839 let parent = resolver.body_owner().unwrap(); 839 let parent = resolver.body_owner().unwrap();
840 ScopeDef::Local(Local { parent, pat_id }) 840 ScopeDef::Local(Local { parent, pat_id })
841 } 841 }
842 resolver::ScopeDef::Label(label_id) => {
843 let parent = resolver.body_owner().unwrap();
844 ScopeDef::Label(Label { parent, label_id })
845 }
842 }; 846 };
843 f(name, def) 847 f(name, def)
844 }) 848 })