// 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)]
// 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)]
}
Definition::GenericParam(it) => label_and_docs(db, it),
Definition::Label(it) => return Some(Markup::fenced_block(&it.name(db))),
- Definition::BuiltinAttr(_) => return None, // FIXME
- Definition::Tool(_) => return None, // FIXME
+ // FIXME: We should be able to show more info about these
+ Definition::BuiltinAttr(it) => return Some(Markup::fenced_block(&it.name(db))),
+ Definition::Tool(it) => return Some(Markup::fenced_block(&it.name(db))),
};
markup(docs.filter(|_| config.documentation.is_some()).map(Into::into), label, mod_path)