aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty
diff options
context:
space:
mode:
authorDylan MacKenzie <[email protected]>2019-09-16 00:42:39 +0100
committerDylan MacKenzie <[email protected]>2019-09-16 00:48:50 +0100
commitbeac779c9661d2aa33fd0758d492b9e8e70b8dcd (patch)
treec1c944182eab6ba47158fa8a3bea53a52e217e6f /crates/ra_hir/src/ty
parent2d79a1ad83cc39075c7c9e3230973013c8c58b17 (diff)
Gracefully handle `const _` items in `ConstData`
Diffstat (limited to 'crates/ra_hir/src/ty')
-rw-r--r--crates/ra_hir/src/ty/infer.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs
index bf57bb3b7..7d9b86752 100644
--- a/crates/ra_hir/src/ty/infer.rs
+++ b/crates/ra_hir/src/ty/infer.rs
@@ -577,7 +577,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
577 577
578 crate::ImplItem::Const(konst) => { 578 crate::ImplItem::Const(konst) => {
579 let data = konst.data(self.db); 579 let data = konst.data(self.db);
580 if segment.name == *data.name() { 580 if Some(&segment.name) == data.name() {
581 Some(ValueNs::Const(konst)) 581 Some(ValueNs::Const(konst))
582 } else { 582 } else {
583 None 583 None