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/hir_def/src/attr.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/hir_def') diff --git a/crates/hir_def/src/attr.rs b/crates/hir_def/src/attr.rs index e4c84afbf..85d01ac3e 100644 --- a/crates/hir_def/src/attr.rs +++ b/crates/hir_def/src/attr.rs @@ -414,7 +414,7 @@ pub enum AttrInput { impl Attr { fn from_src(ast: ast::Attr, hygiene: &Hygiene, index: u32) -> Option { let path = ModPath::from_src(ast.path()?, hygiene)?; - let input = if let Some(lit) = ast.literal() { + let input = if let Some(ast::Expr::Literal(lit)) = ast.expr() { let value = match lit.kind() { ast::LiteralKind::String(string) => string.value()?.into(), _ => lit.syntax().first_token()?.text().trim_matches('"').into(), -- cgit v1.2.3