@@ -165,7 +165,7 @@ pub fn opts() -> Vec<RustcOptGroup> {
165165 o. optmulti( "" , "extern" , "pass an --extern to rustc" , "NAME=PATH" )
166166 } ) ,
167167 stable( "plugin-path" , |o| {
168- o. optmulti( "" , "plugin-path" , "directory to load plugins from " , "DIR" )
168+ o. optmulti( "" , "plugin-path" , "removed " , "DIR" )
169169 } ) ,
170170 stable( "C" , |o| {
171171 o. optmulti( "C" , "codegen" , "pass a codegen option to rustc" , "OPT[=VALUE]" )
@@ -178,7 +178,7 @@ pub fn opts() -> Vec<RustcOptGroup> {
178178 "PASSES" )
179179 } ) ,
180180 stable( "plugins" , |o| {
181- o. optmulti( "" , "plugins" , "space separated list of plugins to also load " ,
181+ o. optmulti( "" , "plugins" , "removed " ,
182182 "PLUGINS" )
183183 } ) ,
184184 stable( "no-default" , |o| {
@@ -741,9 +741,16 @@ where R: 'static + Send,
741741 }
742742 }
743743
744+ if !plugins. is_empty ( ) {
745+ eprintln ! ( "WARNING: --plugins no longer functions; see CVE-2018-1000622" ) ;
746+ }
747+
748+ if !plugin_path. is_none ( ) {
749+ eprintln ! ( "WARNING: --plugin-path no longer functions; see CVE-2018-1000622" ) ;
750+ }
751+
744752 // Load all plugins/passes into a PluginManager
745- let path = plugin_path. unwrap_or ( "/tmp/rustdoc/plugins" . to_string ( ) ) ;
746- let mut pm = plugins:: PluginManager :: new ( PathBuf :: from ( path) ) ;
753+ let mut pm = plugins:: PluginManager :: new ( ) ;
747754 for pass in & passes {
748755 let plugin = match passes:: PASSES . iter ( )
749756 . position ( |& ( p, ..) | {
@@ -757,10 +764,6 @@ where R: 'static + Send,
757764 } ;
758765 pm. add_plugin ( plugin) ;
759766 }
760- info ! ( "loading plugins..." ) ;
761- for pname in plugins {
762- pm. load_plugin ( pname) ;
763- }
764767
765768 // Run everything!
766769 info ! ( "Executing passes/plugins" ) ;
@@ -776,8 +779,6 @@ fn check_deprecated_options(matches: &getopts::Matches, diag: &errors::Handler)
776779 let deprecated_flags = [
777780 "input-format" ,
778781 "output-format" ,
779- "plugin-path" ,
780- "plugins" ,
781782 "no-defaults" ,
782783 "passes" ,
783784 ] ;
0 commit comments