// Dup of the above, but for the hir
Dup of the above, but for the hir
Dup of the above but for the hir
fn extract_crate_info_hir(&self, i: &hir::Item) -> Option<CrateInfo> {
        match i.node {
            hir::ItemExternCrate(ref path_opt) => {
                debug!("resolving extern crate stmt. ident: {} path_opt: {:?}",
                       i.ident, path_opt);
                let name = match *path_opt {
                    Some(name) => {
                        validate_crate_name(Some(self.sess), &name.as_str(),
                                            Some(i.span));
                        name.to_string()
                    }
                    None => i.ident.to_string(),
                };
                Some(CrateInfo {
                    ident: i.ident.to_string(),
                    name: name,
                    id: i.id,
                    should_link: should_link_hir(i),
                })
            }
            _ => None
        }
    }
fn extract_crate_info_hir ( & self , i : & hir :: Item ) -> Option < CrateInfo > { match i . node { hir :: ItemExternCrate ( ref path_opt ) => { debug ! ( " " i ident path_opt ) ; let name = match * path_opt { Some ( name ) => { validate_crate_name ( Some ( self . sess ) , & name . as_str ( ) , Some ( i . span ) ) ; name . to_string ( ) } None => i . ident . to_string ( ) , } ; Some ( CrateInfo { ident : i . ident . to_string ( ) , name : name , id : i . id , should_link : should_link_hir ( i ) , } ) } _ => None } }
Dup of the above, but for the hir
Dup of the above but for the hir
&self
i
&hir::Item