Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/lib.rs')
| -rw-r--r-- | crates/hir/src/lib.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index cfa674cafa..e64a8182c9 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -2031,6 +2031,11 @@ impl BuiltinAttr { // FIXME: def maps registered attrs? hir_def::builtin_attr::find_builtin_attr_idx(name).map(Self) } + + pub fn name(&self, _: &dyn HirDatabase) -> &str { + // FIXME: Return a `Name` here + hir_def::builtin_attr::INERT_ATTRIBUTES[self.0].name + } } #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] @@ -2041,6 +2046,11 @@ impl Tool { // FIXME: def maps registered tools hir_def::builtin_attr::TOOL_MODULES.iter().position(|&tool| tool == name).map(Self) } + + pub fn name(&self, _: &dyn HirDatabase) -> &str { + // FIXME: Return a `Name` here + hir_def::builtin_attr::TOOL_MODULES[self.0] + } } #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] |