mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Remove syntax highlighting hack for builtin attrs
This commit is contained in:
parent
e58af219a4
commit
d1677f3286
13 changed files with 62 additions and 83 deletions
|
@ -2028,7 +2028,7 @@ pub struct BuiltinAttr(usize);
|
|||
|
||||
impl BuiltinAttr {
|
||||
pub(crate) fn by_name(name: &str) -> Option<Self> {
|
||||
// TODO: def maps registered attrs?
|
||||
// FIXME: def maps registered attrs?
|
||||
hir_def::builtin_attr::find_builtin_attr_idx(name).map(Self)
|
||||
}
|
||||
}
|
||||
|
@ -2038,7 +2038,7 @@ pub struct Tool(usize);
|
|||
|
||||
impl Tool {
|
||||
pub(crate) fn by_name(name: &str) -> Option<Self> {
|
||||
// TODO: def maps registered tools
|
||||
// FIXME: def maps registered tools
|
||||
hir_def::builtin_attr::TOOL_MODULES.iter().position(|&tool| tool == name).map(Self)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue