Skip to content

Commit 0c89f38

Browse files
committed
Replace - with _ in generated lint names
1 parent 0b9ba49 commit 0c89f38

File tree

3 files changed

+151
-150
lines changed

3 files changed

+151
-150
lines changed

crates/ide/src/hover.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ pub(crate) fn hover(
123123

124124
_ => {
125125
if ast::Comment::cast(token.clone()).is_some() {
126+
cov_mark::hit!(no_highlight_on_comment_hover);
126127
let (attributes, def) = doc_attributes(&sema, &node)?;
127128
let (docs, doc_mapping) = attributes.docs_with_rangemap(db)?;
128129
let (idl_range, link, ns) =
@@ -136,8 +137,10 @@ pub(crate) fn hover(
136137
})?;
137138
range = Some(idl_range);
138139
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;
139142
} else {
140-
return try_hover_for_attribute(&token);
143+
None
141144
}
142145
},
143146
}
@@ -169,11 +172,6 @@ pub(crate) fn hover(
169172
}
170173
}
171174

172-
if token.kind() == syntax::SyntaxKind::COMMENT {
173-
cov_mark::hit!(no_highlight_on_comment_hover);
174-
return None;
175-
}
176-
177175
if let res @ Some(_) = hover_for_keyword(&sema, links_in_hover, markdown, &token) {
178176
return res;
179177
}

0 commit comments

Comments
 (0)