aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/attr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def/src/attr.rs')
-rw-r--r--crates/hir_def/src/attr.rs2
1 files changed, 1 insertions, 1 deletions
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 {
414impl Attr { 414impl Attr {
415 fn from_src(ast: ast::Attr, hygiene: &Hygiene, index: u32) -> Option<Attr> { 415 fn from_src(ast: ast::Attr, hygiene: &Hygiene, index: u32) -> Option<Attr> {
416 let path = ModPath::from_src(ast.path()?, hygiene)?; 416 let path = ModPath::from_src(ast.path()?, hygiene)?;
417 let input = if let Some(lit) = ast.literal() { 417 let input = if let Some(ast::Expr::Literal(lit)) = ast.expr() {
418 let value = match lit.kind() { 418 let value = match lit.kind() {
419 ast::LiteralKind::String(string) => string.value()?.into(), 419 ast::LiteralKind::String(string) => string.value()?.into(),
420 _ => lit.syntax().first_token()?.text().trim_matches('"').into(), 420 _ => lit.syntax().first_token()?.text().trim_matches('"').into(),