pub fn populate_inherent_implementations_for_type_if_necessary(&self,
                                                                   type_id: DefId) {
        if type_id.is_local() {
            return
        }

        if self.populated_external_types.borrow().contains(&type_id) {
            return
        }

        debug!("populate_inherent_implementations_for_type_if_necessary: searching for {:?}",
               type_id);

        let mut inherent_impls = Vec::new();
        csearch::each_inherent_implementation_for_type(&self.sess.cstore, type_id, |impl_def_id| {
            // Record the implementation.
            inherent_impls.push(impl_def_id);

            // Store the implementation info.
            let impl_items = csearch::get_impl_items(&self.sess.cstore, impl_def_id);
            self.impl_items.borrow_mut().insert(impl_def_id, impl_items);
        });

        self.inherent_impls.borrow_mut().insert(type_id, Rc::new(inherent_impls));
        self.populated_external_types.borrow_mut().insert(type_id);
    }
/// Populates the type context with all the inherent implementations for
/// the given type if necessary.
Populates the type context with all the inherent implementations for
the given type if necessary.
Populates the type context with all the inherent implementations for the given type if necessary .
pub fn populate_inherent_implementations_for_type_if_necessary(&self,
                                                                   type_id: DefId) {
        if type_id.is_local() {
            return
        }
        if self.populated_external_types.borrow().contains(&type_id) {
            return
        }
        debug!("populate_inherent_implementations_for_type_if_necessary: searching for {:?}",
               type_id);
        let mut inherent_impls = Vec::new();
        csearch::each_inherent_implementation_for_type(&self.sess.cstore, type_id, |impl_def_id| {
            // Record the implementation.
            inherent_impls.push(impl_def_id);
            // Store the implementation info.
            let impl_items = csearch::get_impl_items(&self.sess.cstore, impl_def_id);
            self.impl_items.borrow_mut().insert(impl_def_id, impl_items);
        });
        self.inherent_impls.borrow_mut().insert(type_id, Rc::new(inherent_impls));
        self.populated_external_types.borrow_mut().insert(type_id);
    }
pub fn populate_inherent_implementations_for_type_if_necessary ( & self , type_id : DefId ) { if type_id . is_local ( ) { return } if self . populated_external_types . borrow ( ) . contains ( & type_id ) { return } debug ! ( " " type_id ) ; let mut inherent_impls = Vec :: new ( ) ; csearch :: each_inherent_implementation_for_type ( & self . sess . cstore , type_id , | impl_def_id | { // Record the implementation. inherent_impls . push ( impl_def_id ) ; // Store the implementation info. let impl_items = csearch :: get_impl_items ( & self . sess . cstore , impl_def_id ) ; self . impl_items . borrow_mut ( ) . insert ( impl_def_id , impl_items ) ; } ) ; self . inherent_impls . borrow_mut ( ) . insert ( type_id , Rc :: new ( inherent_impls ) ) ; self . populated_external_types . borrow_mut ( ) . insert ( type_id ) ; }
Populates the type context with all the inherent implementations for
the given type if necessary.
Populates the type context with all the inherent implementations for the given type if necessary .
&self
type_id
DefId
&self
type_id
DefId