From 4771a5679188177e653262e69ed7e33b4bf60c65 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Thu, 18 Mar 2021 22:25:10 +0100 Subject: Parse extended_key_value_attributes --- crates/ide/src/syntax_highlighting/inject.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crates/ide/src/syntax_highlighting') diff --git a/crates/ide/src/syntax_highlighting/inject.rs b/crates/ide/src/syntax_highlighting/inject.rs index 947cc974c..90feb6c18 100644 --- a/crates/ide/src/syntax_highlighting/inject.rs +++ b/crates/ide/src/syntax_highlighting/inject.rs @@ -277,9 +277,9 @@ pub(super) fn doc_comment(hl: &mut Highlights, sema: &Semantics, n } fn find_doc_string_in_attr(attr: &hir::Attr, it: &ast::Attr) -> Option { - match it.literal() { + match it.expr() { // #[doc = lit] - Some(lit) => match lit.kind() { + Some(ast::Expr::Literal(lit)) => match lit.kind() { ast::LiteralKind::String(it) => Some(it), _ => None, }, @@ -297,6 +297,7 @@ fn find_doc_string_in_attr(attr: &hir::Attr, it: &ast::Attr) -> Option return None, } } -- cgit v1.2.3