aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/semantics
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-07-30 16:39:56 +0100
committerGitHub <[email protected]>2020-07-30 16:39:56 +0100
commit0c8944314cb323416c8ad6ad27347ca056c5a91c (patch)
tree2a31c4bdfb62fe00b5109366155b0b4a40bf471d /crates/ra_hir/src/semantics
parent2496628c56415f4456803e4487f90bad96337d57 (diff)
parent1ae4721c9cfea746fce59a816b1c266bf373d6cf (diff)
Merge #5601
5601: Finalize union grammar r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/semantics')
-rw-r--r--crates/ra_hir/src/semantics/source_to_def.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/semantics/source_to_def.rs b/crates/ra_hir/src/semantics/source_to_def.rs
index 4f90f588e..0093a8671 100644
--- a/crates/ra_hir/src/semantics/source_to_def.rs
+++ b/crates/ra_hir/src/semantics/source_to_def.rs
@@ -80,7 +80,7 @@ impl SourceToDefCtx<'_, '_> {
80 pub(super) fn enum_to_def(&mut self, src: InFile<ast::EnumDef>) -> Option<EnumId> { 80 pub(super) fn enum_to_def(&mut self, src: InFile<ast::EnumDef>) -> Option<EnumId> {
81 self.to_def(src, keys::ENUM) 81 self.to_def(src, keys::ENUM)
82 } 82 }
83 pub(super) fn union_to_def(&mut self, src: InFile<ast::UnionDef>) -> Option<UnionId> { 83 pub(super) fn union_to_def(&mut self, src: InFile<ast::Union>) -> Option<UnionId> {
84 self.to_def(src, keys::UNION) 84 self.to_def(src, keys::UNION)
85 } 85 }
86 pub(super) fn static_to_def(&mut self, src: InFile<ast::StaticDef>) -> Option<StaticId> { 86 pub(super) fn static_to_def(&mut self, src: InFile<ast::StaticDef>) -> Option<StaticId> {
@@ -174,7 +174,7 @@ impl SourceToDefCtx<'_, '_> {
174 let def = self.enum_to_def(container.with_value(it))?; 174 let def = self.enum_to_def(container.with_value(it))?;
175 def.into() 175 def.into()
176 }, 176 },
177 ast::UnionDef(it) => { 177 ast::Union(it) => {
178 let def = self.union_to_def(container.with_value(it))?; 178 let def = self.union_to_def(container.with_value(it))?;
179 VariantId::from(def).into() 179 VariantId::from(def).into()
180 }, 180 },