diff options
Diffstat (limited to 'crates/ra_hir/src/semantics.rs')
-rw-r--r-- | crates/ra_hir/src/semantics.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/crates/ra_hir/src/semantics.rs b/crates/ra_hir/src/semantics.rs index 3d78f71c1..6b6c5e494 100644 --- a/crates/ra_hir/src/semantics.rs +++ b/crates/ra_hir/src/semantics.rs | |||
@@ -192,6 +192,10 @@ impl<'db, DB: HirDatabase> Semantics<'db, DB> { | |||
192 | self.imp.type_of_pat(pat) | 192 | self.imp.type_of_pat(pat) |
193 | } | 193 | } |
194 | 194 | ||
195 | pub fn type_of_self(&self, param: &ast::SelfParam) -> Option<Type> { | ||
196 | self.imp.type_of_self(param) | ||
197 | } | ||
198 | |||
195 | pub fn resolve_method_call(&self, call: &ast::MethodCallExpr) -> Option<Function> { | 199 | pub fn resolve_method_call(&self, call: &ast::MethodCallExpr) -> Option<Function> { |
196 | self.imp.resolve_method_call(call) | 200 | self.imp.resolve_method_call(call) |
197 | } | 201 | } |
@@ -216,6 +220,7 @@ impl<'db, DB: HirDatabase> Semantics<'db, DB> { | |||
216 | self.imp.resolve_path(path) | 220 | self.imp.resolve_path(path) |
217 | } | 221 | } |
218 | 222 | ||
223 | // TODO: id | ||
219 | pub fn resolve_variant(&self, record_lit: ast::RecordLit) -> Option<VariantId> { | 224 | pub fn resolve_variant(&self, record_lit: ast::RecordLit) -> Option<VariantId> { |
220 | self.imp.resolve_variant(record_lit) | 225 | self.imp.resolve_variant(record_lit) |
221 | } | 226 | } |
@@ -377,6 +382,10 @@ impl<'db> SemanticsImpl<'db> { | |||
377 | self.analyze(pat.syntax()).type_of_pat(self.db, &pat) | 382 | self.analyze(pat.syntax()).type_of_pat(self.db, &pat) |
378 | } | 383 | } |
379 | 384 | ||
385 | pub fn type_of_self(&self, param: &ast::SelfParam) -> Option<Type> { | ||
386 | self.analyze(param.syntax()).type_of_self(self.db, ¶m) | ||
387 | } | ||
388 | |||
380 | pub fn resolve_method_call(&self, call: &ast::MethodCallExpr) -> Option<Function> { | 389 | pub fn resolve_method_call(&self, call: &ast::MethodCallExpr) -> Option<Function> { |
381 | self.analyze(call.syntax()).resolve_method_call(self.db, call) | 390 | self.analyze(call.syntax()).resolve_method_call(self.db, call) |
382 | } | 391 | } |