save-analysis: use a function's short name
This commit is contained in:
parent
e24d621fca
commit
5106ce7bfb
@ -123,15 +123,14 @@ pub fn get_external_crates(&self) -> Vec<CrateData> {
|
||||
pub fn get_item_data(&self, item: &ast::Item) -> Option<Data> {
|
||||
match item.node {
|
||||
ast::ItemKind::Fn(ref decl, _, _, _, ref generics, _) => {
|
||||
let name = self.tcx.node_path_str(item.id);
|
||||
let qualname = format!("::{}", name);
|
||||
let qualname = format!("::{}", self.tcx.node_path_str(item.id));
|
||||
let sub_span = self.span_utils.sub_span_after_keyword(item.span, keywords::Fn);
|
||||
filter!(self.span_utils, sub_span, item.span, None);
|
||||
|
||||
|
||||
Some(Data::FunctionData(FunctionData {
|
||||
id: item.id,
|
||||
name: name,
|
||||
name: item.ident.to_string(),
|
||||
qualname: qualname,
|
||||
declaration: None,
|
||||
span: sub_span.unwrap(),
|
||||
|
Loading…
Reference in New Issue
Block a user