diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-11-30 11:31:25 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-12-01 20:53:25 +0300 |
| commit | db357a6e3be7b741a710a926d3ddeed79fc40482 (patch) | |
| tree | a3c77e5480bc39b6605e7f69c154f0414acd0f55 /src/librustc_plugin_impl | |
| parent | 55ba05bd0dd0d7f8e8b288e4a69fc426619bc806 (diff) | |
| download | rust-db357a6e3be7b741a710a926d3ddeed79fc40482.tar.gz rust-db357a6e3be7b741a710a926d3ddeed79fc40482.zip | |
rustc_plugin: Remove support for adding plugins from command line
Diffstat (limited to 'src/librustc_plugin_impl')
| -rw-r--r-- | src/librustc_plugin_impl/load.rs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/librustc_plugin_impl/load.rs b/src/librustc_plugin_impl/load.rs index 8150af5b2b6..6f2af6895e4 100644 --- a/src/librustc_plugin_impl/load.rs +++ b/src/librustc_plugin_impl/load.rs @@ -28,10 +28,8 @@ fn call_malformed_plugin_attribute(sess: &Session, span: Span) { /// Read plugin metadata and dynamically load registrar functions. pub fn load_plugins(sess: &Session, metadata_loader: &dyn MetadataLoader, - krate: &Crate, - addl_plugins: Option<Vec<String>>) -> Vec<PluginRegistrarFn> { + krate: &Crate) -> Vec<PluginRegistrarFn> { let mut plugins = Vec::new(); - let mut load_plugin = |ident| load_plugin(&mut plugins, sess, metadata_loader, ident); for attr in &krate.attrs { if !attr.check_name(sym::plugin) { @@ -40,16 +38,13 @@ pub fn load_plugins(sess: &Session, for plugin in attr.meta_item_list().unwrap_or_default() { match plugin.ident() { - Some(ident) if plugin.is_word() => load_plugin(ident), + Some(ident) if plugin.is_word() => + load_plugin(&mut plugins, sess, metadata_loader, ident), _ => call_malformed_plugin_attribute(sess, plugin.span()), } } } - for plugin in addl_plugins.unwrap_or_default() { - load_plugin(Ident::from_str(&plugin)); - } - plugins } |
