aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/type_ref.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2019-09-07 13:31:43 +0100
committerFlorian Diebold <[email protected]>2019-09-07 13:31:43 +0100
commit60bdb66ef23f78d8c73afa1897a4542e7e722ed2 (patch)
treecc5dc599d3c369a4769c792a2c440749ed4b7771 /crates/ra_hir/src/type_ref.rs
parent4ae4d9c311084e3092eb4c2d35e98f6c2c70315b (diff)
Lower bounds on trait definition, and resolve assoc types from super traits
Diffstat (limited to 'crates/ra_hir/src/type_ref.rs')
-rw-r--r--crates/ra_hir/src/type_ref.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/ra_hir/src/type_ref.rs b/crates/ra_hir/src/type_ref.rs
index fa91bfb22..bc8acc7ee 100644
--- a/crates/ra_hir/src/type_ref.rs
+++ b/crates/ra_hir/src/type_ref.rs
@@ -150,4 +150,11 @@ impl TypeBound {
150 ast::TypeBoundKind::ForType(_) | ast::TypeBoundKind::Lifetime(_) => TypeBound::Error, 150 ast::TypeBoundKind::ForType(_) | ast::TypeBoundKind::Lifetime(_) => TypeBound::Error,
151 } 151 }
152 } 152 }
153
154 pub fn as_path(&self) -> Option<&Path> {
155 match self {
156 TypeBound::Path(p) => Some(p),
157 _ => None,
158 }
159 }
153} 160}