diff options
Diffstat (limited to 'crates/hir_def')
-rw-r--r-- | crates/hir_def/src/attr.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_def/src/attr.rs b/crates/hir_def/src/attr.rs index 1cab0e363..0360fb627 100644 --- a/crates/hir_def/src/attr.rs +++ b/crates/hir_def/src/attr.rs | |||
@@ -458,7 +458,7 @@ pub enum AttrInput { | |||
458 | impl Attr { | 458 | impl Attr { |
459 | fn from_src(ast: ast::Attr, hygiene: &Hygiene, index: u32) -> Option<Attr> { | 459 | fn from_src(ast: ast::Attr, hygiene: &Hygiene, index: u32) -> Option<Attr> { |
460 | let path = ModPath::from_src(ast.path()?, hygiene)?; | 460 | let path = ModPath::from_src(ast.path()?, hygiene)?; |
461 | let input = if let Some(lit) = ast.literal() { | 461 | let input = if let Some(ast::Expr::Literal(lit)) = ast.expr() { |
462 | let value = match lit.kind() { | 462 | let value = match lit.kind() { |
463 | ast::LiteralKind::String(string) => string.value()?.into(), | 463 | ast::LiteralKind::String(string) => string.value()?.into(), |
464 | _ => lit.syntax().first_token()?.text().trim_matches('"').into(), | 464 | _ => lit.syntax().first_token()?.text().trim_matches('"').into(), |