]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/lib.rs
Auto merge of #52194 - steveklabnik:remove-plugins, r=QuietMisdreavus,GuillaumeGomez
[rust.git] / src / librustdoc / lib.rs
index 5f4739bd22276ac10247e3871a43664d573ac8fd..3e26ed2b97c23c893bb05f1f0857076a2e230c7f 100644 (file)
@@ -165,7 +165,7 @@ pub fn opts() -> Vec<RustcOptGroup> {
             o.optmulti("", "extern", "pass an --extern to rustc", "NAME=PATH")
         }),
         stable("plugin-path", |o| {
-            o.optmulti("", "plugin-path", "directory to load plugins from", "DIR")
+            o.optmulti("", "plugin-path", "removed", "DIR")
         }),
         stable("C", |o| {
             o.optmulti("C", "codegen", "pass a codegen option to rustc", "OPT[=VALUE]")
@@ -178,7 +178,7 @@ pub fn opts() -> Vec<RustcOptGroup> {
                        "PASSES")
         }),
         stable("plugins", |o| {
-            o.optmulti("", "plugins", "space separated list of plugins to also load",
+            o.optmulti("", "plugins", "removed",
                        "PLUGINS")
         }),
         stable("no-default", |o| {
@@ -741,9 +741,16 @@ fn report_deprecated_attr(name: &str, diag: &errors::Handler) {
             }
         }
 
+        if !plugins.is_empty() {
+            eprintln!("WARNING: --plugins no longer functions; see CVE-2018-1000622");
+        }
+
+        if !plugin_path.is_none() {
+            eprintln!("WARNING: --plugin-path no longer functions; see CVE-2018-1000622");
+        }
+
         // Load all plugins/passes into a PluginManager
-        let path = plugin_path.unwrap_or("/tmp/rustdoc/plugins".to_string());
-        let mut pm = plugins::PluginManager::new(PathBuf::from(path));
+        let mut pm = plugins::PluginManager::new();
         for pass in &passes {
             let plugin = match passes::PASSES.iter()
                                              .position(|&(p, ..)| {
@@ -757,10 +764,6 @@ fn report_deprecated_attr(name: &str, diag: &errors::Handler) {
             };
             pm.add_plugin(plugin);
         }
-        info!("loading plugins...");
-        for pname in plugins {
-            pm.load_plugin(pname);
-        }
 
         // Run everything!
         info!("Executing passes/plugins");
@@ -776,8 +779,6 @@ fn check_deprecated_options(matches: &getopts::Matches, diag: &errors::Handler)
     let deprecated_flags = [
        "input-format",
        "output-format",
-       "plugin-path",
-       "plugins",
        "no-defaults",
        "passes",
     ];