pub fn lookup_decl<'a>(&'a self,
                           pos: &Pos,
                           package: &'a Package,
                           custom: &Custom)
                           -> Result<(&'a Package, &'a Decl)> {
        let package = if let Some(ref prefix) = custom.prefix {
            self.lookup_used(pos, package, prefix)?
        } else {
            package
        };

        let key = (package.clone(), custom.parts.clone());

        if let Some(decl) = self.types.get(&key) {
            return Ok((package, decl));
        }

        return Err(Error::pos("no such type".to_owned(), pos.clone()).into());
    }
/// Lookup the declaration matching the custom type.
Lookup the declaration matching the custom type.
Lookup the declaration matching the custom type .
pub fn lookup_decl<'a>(&'a self,
                           pos: &Pos,
                           package: &'a Package,
                           custom: &Custom)
                           -> Result<(&'a Package, &'a Decl)> {
        let package = if let Some(ref prefix) = custom.prefix {
            self.lookup_used(pos, package, prefix)?
        } else {
            package
        };
        let key = (package.clone(), custom.parts.clone());
        if let Some(decl) = self.types.get(&key) {
            return Ok((package, decl));
        }
        return Err(Error::pos("no such type".to_owned(), pos.clone()).into());
    }
pub fn lookup_decl < ' a > ( & ' a self , pos : & Pos , package : & ' a Package , custom : & Custom ) -> Result < ( & ' a Package , & ' a Decl ) > { let package = if let Some ( ref prefix ) = custom . prefix { self . lookup_used ( pos , package , prefix ) ? } else { package } ; let key = ( package . clone ( ) , custom . parts . clone ( ) ) ; if let Some ( decl ) = self . types . get ( & key ) { return Ok ( ( package , decl ) ) ; } return Err ( Error :: pos ( " " . to_owned ( ) , pos . clone ( ) ) . into ( ) ) ; }
Lookup the declaration matching the custom type.
Lookup the declaration matching the custom type .
&'a self
pos
&Pos
package
&'a Package
custom
&Custom
&'a self
pos
&Pos
package
&'a Package
custom
&Custom