diff options
author | Lukas Wirth <[email protected]> | 2021-06-04 18:03:45 +0100 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2021-06-04 18:10:52 +0100 |
commit | 0c89f38378c2110cf6c080a5dc837bf7731fef5c (patch) | |
tree | 97955f808060af829122b39e07a80fbd9622db18 /crates/ide | |
parent | 0b9ba4977ef5b81747c8e5c623009497f9d7c99a (diff) |
Replace `-` with `_` in generated lint names
Diffstat (limited to 'crates/ide')
-rw-r--r-- | crates/ide/src/hover.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs index f3f6f749c..573ffd10d 100644 --- a/crates/ide/src/hover.rs +++ b/crates/ide/src/hover.rs | |||
@@ -123,6 +123,7 @@ pub(crate) fn hover( | |||
123 | 123 | ||
124 | _ => { | 124 | _ => { |
125 | if ast::Comment::cast(token.clone()).is_some() { | 125 | if ast::Comment::cast(token.clone()).is_some() { |
126 | cov_mark::hit!(no_highlight_on_comment_hover); | ||
126 | let (attributes, def) = doc_attributes(&sema, &node)?; | 127 | let (attributes, def) = doc_attributes(&sema, &node)?; |
127 | let (docs, doc_mapping) = attributes.docs_with_rangemap(db)?; | 128 | let (docs, doc_mapping) = attributes.docs_with_rangemap(db)?; |
128 | let (idl_range, link, ns) = | 129 | let (idl_range, link, ns) = |
@@ -136,8 +137,10 @@ pub(crate) fn hover( | |||
136 | })?; | 137 | })?; |
137 | range = Some(idl_range); | 138 | range = Some(idl_range); |
138 | resolve_doc_path_for_def(db, def, &link, ns).map(Definition::ModuleDef) | 139 | resolve_doc_path_for_def(db, def, &link, ns).map(Definition::ModuleDef) |
140 | } else if let res@Some(_) = try_hover_for_attribute(&token) { | ||
141 | return res; | ||
139 | } else { | 142 | } else { |
140 | return try_hover_for_attribute(&token); | 143 | None |
141 | } | 144 | } |
142 | }, | 145 | }, |
143 | } | 146 | } |
@@ -169,11 +172,6 @@ pub(crate) fn hover( | |||
169 | } | 172 | } |
170 | } | 173 | } |
171 | 174 | ||
172 | if token.kind() == syntax::SyntaxKind::COMMENT { | ||
173 | cov_mark::hit!(no_highlight_on_comment_hover); | ||
174 | return None; | ||
175 | } | ||
176 | |||
177 | if let res @ Some(_) = hover_for_keyword(&sema, links_in_hover, markdown, &token) { | 175 | if let res @ Some(_) = hover_for_keyword(&sema, links_in_hover, markdown, &token) { |
178 | return res; | 176 | return res; |
179 | } | 177 | } |