mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
Replace -
with _
in generated lint names
This commit is contained in:
parent
0b9ba4977e
commit
0c89f38378
3 changed files with 151 additions and 150 deletions
|
@ -123,6 +123,7 @@ pub(crate) fn hover(
|
|||
|
||||
_ => {
|
||||
if ast::Comment::cast(token.clone()).is_some() {
|
||||
cov_mark::hit!(no_highlight_on_comment_hover);
|
||||
let (attributes, def) = doc_attributes(&sema, &node)?;
|
||||
let (docs, doc_mapping) = attributes.docs_with_rangemap(db)?;
|
||||
let (idl_range, link, ns) =
|
||||
|
@ -136,8 +137,10 @@ pub(crate) fn hover(
|
|||
})?;
|
||||
range = Some(idl_range);
|
||||
resolve_doc_path_for_def(db, def, &link, ns).map(Definition::ModuleDef)
|
||||
} else if let res@Some(_) = try_hover_for_attribute(&token) {
|
||||
return res;
|
||||
} else {
|
||||
return try_hover_for_attribute(&token);
|
||||
None
|
||||
}
|
||||
},
|
||||
}
|
||||
|
@ -169,11 +172,6 @@ pub(crate) fn hover(
|
|||
}
|
||||
}
|
||||
|
||||
if token.kind() == syntax::SyntaxKind::COMMENT {
|
||||
cov_mark::hit!(no_highlight_on_comment_hover);
|
||||
return None;
|
||||
}
|
||||
|
||||
if let res @ Some(_) = hover_for_keyword(&sema, links_in_hover, markdown, &token) {
|
||||
return res;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue