Auto merge of #29788 - mitaa:module_name, r=arielb1

f357d55 caused a regression by retrieving item names from metadata, while previously using the last element of its absolute path (which in the case of a root module is the prefixed crate name since the stored path in metadata is empty)

fixes #28927
This commit is contained in:
bors 2015-11-15 23:58:26 +00:00
commit 531b0539b7
4 changed files with 40 additions and 1 deletions

View file

@ -1500,7 +1500,7 @@ fn encode_info_for_items<'a, 'tcx>(ecx: &EncodeContext<'a, 'tcx>,
&[],
CRATE_NODE_ID,
[].iter().cloned().chain(LinkedPath::empty()),
syntax::parse::token::special_idents::invalid.name,
syntax::parse::token::intern(&ecx.link_meta.crate_name),
hir::Public);
visit::walk_crate(&mut EncodeVisitor {