pub fn load_plugins(sess: &Session, krate: &ast::Crate,
                    addl_plugins: Option<Plugins>) -> Plugins {
    let mut loader = PluginLoader::new(sess);
    visit::walk_crate(&mut loader, krate);

    let mut plugins = loader.plugins;

    match addl_plugins {
        Some(addl_plugins) => {
            // Add in the additional plugins requested by the frontend
            let Plugins { macros: addl_macros, registrars: addl_registrars } = addl_plugins;
            plugins.macros.extend(addl_macros.into_iter());
            plugins.registrars.extend(addl_registrars.into_iter());
        }
        None => ()
    }

    return plugins;
}
/// Read plugin metadata and dynamically load registrar functions.
Read plugin metadata and dynamically load registrar functions.
Read plugin metadata and dynamically load registrar functions .
pub fn load_plugins(sess: &Session, krate: &ast::Crate,
                    addl_plugins: Option<Plugins>) -> Plugins {
    let mut loader = PluginLoader::new(sess);
    visit::walk_crate(&mut loader, krate);
    let mut plugins = loader.plugins;
    match addl_plugins {
        Some(addl_plugins) => {
            // Add in the additional plugins requested by the frontend
            let Plugins { macros: addl_macros, registrars: addl_registrars } = addl_plugins;
            plugins.macros.extend(addl_macros.into_iter());
            plugins.registrars.extend(addl_registrars.into_iter());
        }
        None => ()
    }
    return plugins;
}
pub fn load_plugins ( sess : & Session , krate : & ast :: Crate , addl_plugins : Option < Plugins > ) -> Plugins { let mut loader = PluginLoader :: new ( sess ) ; visit :: walk_crate ( & mut loader , krate ) ; let mut plugins = loader . plugins ; match addl_plugins { Some ( addl_plugins ) => { // Add in the additional plugins requested by the frontend let Plugins { macros : addl_macros , registrars : addl_registrars } = addl_plugins ; plugins . macros . extend ( addl_macros . into_iter ( ) ) ; plugins . registrars . extend ( addl_registrars . into_iter ( ) ) ; } None => ( ) } return plugins ; }
Read plugin metadata and dynamically load registrar functions.
Read plugin metadata and dynamically load registrar functions .
sess
&Session
krate
&ast::Crate
addl_plugins
Option<Plugins>
sess
&Session
krate
&ast::Crate
addl_plugins
Option<Plugins>