diff options
| author | Ariel Ben-Yehuda <ariel.byd@gmail.com> | 2015-11-21 21:39:05 +0200 |
|---|---|---|
| committer | Ariel Ben-Yehuda <arielb1@mail.tau.ac.il> | 2015-11-26 18:21:17 +0200 |
| commit | d45dd9423e0fa11510f3e62dd0f286bf6c0cdf37 (patch) | |
| tree | 4c37217cfff610906c14faf3b6ae2448c2b2d001 /src/librustc/plugin | |
| parent | 11dbb69bd14f52940d54981b883814d52153dc57 (diff) | |
| download | rust-d45dd9423e0fa11510f3e62dd0f286bf6c0cdf37.tar.gz rust-d45dd9423e0fa11510f3e62dd0f286bf6c0cdf37.zip | |
make CrateStore a trait object
rustdoc still broken
Diffstat (limited to 'src/librustc/plugin')
| -rw-r--r-- | src/librustc/plugin/load.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/librustc/plugin/load.rs b/src/librustc/plugin/load.rs index 751e748094d..ed721b6dab0 100644 --- a/src/librustc/plugin/load.rs +++ b/src/librustc/plugin/load.rs @@ -12,6 +12,7 @@ use session::Session; use metadata::creader::CrateReader; +use metadata::cstore::CStore; use plugin::registry::Registry; use std::borrow::ToOwned; @@ -43,9 +44,9 @@ fn call_malformed_plugin_attribute(a: &Session, b: Span) { } /// Read plugin metadata and dynamically load registrar functions. -pub fn load_plugins(sess: &Session, krate: &ast::Crate, +pub fn load_plugins(sess: &Session, cstore: &CStore, krate: &ast::Crate, addl_plugins: Option<Vec<String>>) -> Vec<PluginRegistrar> { - let mut loader = PluginLoader::new(sess); + let mut loader = PluginLoader::new(sess, cstore); for attr in &krate.attrs { if !attr.check_name("plugin") { @@ -81,10 +82,10 @@ pub fn load_plugins(sess: &Session, krate: &ast::Crate, } impl<'a> PluginLoader<'a> { - fn new(sess: &'a Session) -> PluginLoader<'a> { + fn new(sess: &'a Session, cstore: &'a CStore) -> PluginLoader<'a> { PluginLoader { sess: sess, - reader: CrateReader::new(sess), + reader: CrateReader::new(sess, cstore), plugins: vec![], } } |
