@@ -164,7 +164,7 @@ pub fn opts() -> Vec<RustcOptGroup> {
164164 o. optmulti( "" , "extern" , "pass an --extern to rustc" , "NAME=PATH" )
165165 } ) ,
166166 stable( "plugin-path" , |o| {
167- o. optmulti( "" , "plugin-path" , "directory to load plugins from " , "DIR" )
167+ o. optmulti( "" , "plugin-path" , "removed " , "DIR" )
168168 } ) ,
169169 stable( "C" , |o| {
170170 o. optmulti( "C" , "codegen" , "pass a codegen option to rustc" , "OPT[=VALUE]" )
@@ -177,7 +177,7 @@ pub fn opts() -> Vec<RustcOptGroup> {
177177 "PASSES" )
178178 } ) ,
179179 stable( "plugins" , |o| {
180- o. optmulti( "" , "plugins" , "space separated list of plugins to also load " ,
180+ o. optmulti( "" , "plugins" , "removed " ,
181181 "PLUGINS" )
182182 } ) ,
183183 stable( "no-default" , |o| {
@@ -715,9 +715,16 @@ where R: 'static + Send,
715715 }
716716 }
717717
718+ if !plugins. is_empty ( ) {
719+ eprintln ! ( "WARNING: --plugins no longer functions; see CVE-2018-1000622" ) ;
720+ }
721+
722+ if !plugin_path. is_none ( ) {
723+ eprintln ! ( "WARNING: --plugin-path no longer functions; see CVE-2018-1000622" ) ;
724+ }
725+
718726 // Load all plugins/passes into a PluginManager
719- let path = plugin_path. unwrap_or ( "/tmp/rustdoc/plugins" . to_string ( ) ) ;
720- let mut pm = plugins:: PluginManager :: new ( PathBuf :: from ( path) ) ;
727+ let mut pm = plugins:: PluginManager :: new ( ) ;
721728 for pass in & passes {
722729 let plugin = match passes:: PASSES . iter ( )
723730 . position ( |& ( p, ..) | {
@@ -731,10 +738,6 @@ where R: 'static + Send,
731738 } ;
732739 pm. add_plugin ( plugin) ;
733740 }
734- info ! ( "loading plugins..." ) ;
735- for pname in plugins {
736- pm. load_plugin ( pname) ;
737- }
738741
739742 // Run everything!
740743 info ! ( "Executing passes/plugins" ) ;
@@ -750,8 +753,6 @@ fn check_deprecated_options(matches: &getopts::Matches, diag: &errors::Handler)
750753 let deprecated_flags = [
751754 "input-format" ,
752755 "output-format" ,
753- "plugin-path" ,
754- "plugins" ,
755756 "no-defaults" ,
756757 "passes" ,
757758 ] ;
0 commit comments