Commit eefe8279 authored by Josh Chase's avatar Josh Chase Committed by Ryan Hunt
Browse files

Support extern crate ... as ...; imports

parent 4d746230
......@@ -291,8 +291,12 @@ fn process_mod<F>(pkg: &PackageRef,
context.cfg_stack.pop();
}
}
syn::ItemKind::ExternCrate(_) => {
let dep_pkg_name = item.ident.to_string();
syn::ItemKind::ExternCrate(ref cr) => {
let dep_pkg_name = if let Some(ref name) = *cr {
name.to_string()
} else {
item.ident.to_string()
};
let cfg = Cfg::load(&item.attrs);
if let &Some(ref cfg) = &cfg {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment