pub fn build(sess: &Session, krate: &Crate) -> Index {
        let mut staged_api = false;
        for attr in krate.attrs.iter() {
            if attr.name().get() == "staged_api" {
                match attr.node.value.node {
                    ast::MetaWord(_) => {
                        attr::mark_used(attr);
                        staged_api = true;
                    }
                    _ => (/*pass*/)
                }
            }
        }
        let index = Index {
            staged_api: staged_api,
            local: NodeMap(),
            extern_cache: DefIdMap()
        };
        if !staged_api {
            return index;
        }
        let mut annotator = Annotator {
            sess: sess,
            index: index,
            parent: None
        };
        annotator.annotate(ast::CRATE_NODE_ID, true, &krate.attrs, krate.span,
                           |v| visit::walk_crate(v, krate));
        annotator.index
    }
/// Construct the stability index for a crate being compiled.
Construct the stability index for a crate being compiled.
Construct the stability index for a crate being compiled .
pub fn build(sess: &Session, krate: &Crate) -> Index {
        let mut staged_api = false;
        for attr in krate.attrs.iter() {
            if attr.name().get() == "staged_api" {
                match attr.node.value.node {
                    ast::MetaWord(_) => {
                        attr::mark_used(attr);
                        staged_api = true;
                    }
                    _ => (/*pass*/)
                }
            }
        }
        let index = Index {
            staged_api: staged_api,
            local: NodeMap(),
            extern_cache: DefIdMap()
        };
        if !staged_api {
            return index;
        }
        let mut annotator = Annotator {
            sess: sess,
            index: index,
            parent: None
        };
        annotator.annotate(ast::CRATE_NODE_ID, true, &krate.attrs, krate.span,
                           |v| visit::walk_crate(v, krate));
        annotator.index
    }
pub fn build ( sess : & Session , krate : & Crate ) -> Index { let mut staged_api = false ; for attr in krate . attrs . iter ( ) { if attr . name ( ) . get ( ) == " " { match attr . node . value . node { ast :: MetaWord ( _ ) => { attr :: mark_used ( attr ) ; staged_api = true ; } _ => ( /*pass*/ ) } } } let index = Index { staged_api : staged_api , local : NodeMap ( ) , extern_cache : DefIdMap ( ) } ; if ! staged_api { return index ; } let mut annotator = Annotator { sess : sess , index : index , parent : None } ; annotator . annotate ( ast :: CRATE_NODE_ID , true , & krate . attrs , krate . span , | v | visit :: walk_crate ( v , krate ) ) ; annotator . index }
Construct the stability index for a crate being compiled.
Construct the stability index for a crate being compiled .
sess
&Session
krate
&Crate
sess
&Session
krate
&Crate