From beac779c9661d2aa33fd0758d492b9e8e70b8dcd Mon Sep 17 00:00:00 2001 From: Dylan MacKenzie Date: Sun, 15 Sep 2019 16:42:39 -0700 Subject: Gracefully handle `const _` items in `ConstData` --- crates/ra_hir/src/ty/infer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_hir/src/ty/infer.rs') 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> { crate::ImplItem::Const(konst) => { let data = konst.data(self.db); - if segment.name == *data.name() { + if Some(&segment.name) == data.name() { Some(ValueNs::Const(konst)) } else { None -- cgit v1.2.3