aboutsummaryrefslogtreecommitdiff
path: root/crates/ide
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2021-06-11 17:12:51 +0100
committerJonas Schievink <[email protected]>2021-06-11 17:34:30 +0100
commit1d6eef1350ee0793fcd2a0eb191cdb127b76a49d (patch)
tree6f3f37d7ac665a7b6b6325da0d3b411741cd7069 /crates/ide
parent80b3b740184a6a64ee0ff8767ab6f5b786dc0dd7 (diff)
Update ungrammar
Diffstat (limited to 'crates/ide')
-rw-r--r--crates/ide/src/hover.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs
index ed4f18e1f..1c6d36939 100644
--- a/crates/ide/src/hover.rs
+++ b/crates/ide/src/hover.rs
@@ -208,7 +208,7 @@ pub(crate) fn hover(
208} 208}
209 209
210fn try_hover_for_attribute(token: &SyntaxToken) -> Option<RangeInfo<HoverResult>> { 210fn try_hover_for_attribute(token: &SyntaxToken) -> Option<RangeInfo<HoverResult>> {
211 let attr = token.ancestors().nth(1).and_then(ast::Attr::cast)?; 211 let attr = token.ancestors().find_map(ast::Attr::cast)?;
212 let (path, tt) = attr.as_simple_call()?; 212 let (path, tt) = attr.as_simple_call()?;
213 if !tt.syntax().text_range().contains(token.text_range().start()) { 213 if !tt.syntax().text_range().contains(token.text_range().start()) {
214 return None; 214 return None;