aboutsummaryrefslogtreecommitdiff
path: root/crates/hir
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2021-05-08 21:34:55 +0100
committerLukas Wirth <[email protected]>2021-05-08 21:34:55 +0100
commit41f470fea84998af65292f3c297c3e2b1d897848 (patch)
tree2dee702ff58dd614a559e9f4ef3080419cabd2c4 /crates/hir
parent96c5df9b171730ad69e130e074584684cee35014 (diff)
Correctly support SelfType when searching for usages
Diffstat (limited to 'crates/hir')
-rw-r--r--crates/hir/src/lib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index ac23e385e..c9ef4b420 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -2071,6 +2071,10 @@ impl Type {
2071 Some(adt.into()) 2071 Some(adt.into())
2072 } 2072 }
2073 2073
2074 pub fn as_builtin(&self) -> Option<BuiltinType> {
2075 self.ty.as_builtin().map(|inner| BuiltinType { inner })
2076 }
2077
2074 pub fn as_dyn_trait(&self) -> Option<Trait> { 2078 pub fn as_dyn_trait(&self) -> Option<Trait> {
2075 self.ty.dyn_trait().map(Into::into) 2079 self.ty.dyn_trait().map(Into::into)
2076 } 2080 }