@@ -159,7 +159,7 @@ pub fn opts() -> Vec<RustcOptGroup> {
159159 o. optmulti( "" , "extern" , "pass an --extern to rustc" , "NAME=PATH" )
160160 } ) ,
161161 stable( "plugin-path" , |o| {
162- o. optmulti( "" , "plugin-path" , "directory to load plugins from " , "DIR" )
162+ o. optmulti( "" , "plugin-path" , "removed " , "DIR" )
163163 } ) ,
164164 stable( "C" , |o| {
165165 o. optmulti( "C" , "codegen" , "pass a codegen option to rustc" , "OPT[=VALUE]" )
@@ -172,7 +172,7 @@ pub fn opts() -> Vec<RustcOptGroup> {
172172 "PASSES" )
173173 } ) ,
174174 stable( "plugins" , |o| {
175- o. optmulti( "" , "plugins" , "space separated list of plugins to also load " ,
175+ o. optmulti( "" , "plugins" , "removed " ,
176176 "PLUGINS" )
177177 } ) ,
178178 stable( "no-default" , |o| {
@@ -710,9 +710,16 @@ where R: 'static + Send,
710710 }
711711 }
712712
713+ if !plugins. is_empty ( ) {
714+ eprintln ! ( "WARNING: --plugins no longer functions; see CVE-2018-1000622" ) ;
715+ }
716+
717+ if !plugin_path. is_none ( ) {
718+ eprintln ! ( "WARNING: --plugin-path no longer functions; see CVE-2018-1000622" ) ;
719+ }
720+
713721 // Load all plugins/passes into a PluginManager
714- let path = plugin_path. unwrap_or ( "/tmp/rustdoc/plugins" . to_string ( ) ) ;
715- let mut pm = plugins:: PluginManager :: new ( PathBuf :: from ( path) ) ;
722+ let mut pm = plugins:: PluginManager :: new ( ) ;
716723 for pass in & passes {
717724 let plugin = match passes:: PASSES . iter ( )
718725 . position ( |& ( p, ..) | {
@@ -726,10 +733,6 @@ where R: 'static + Send,
726733 } ;
727734 pm. add_plugin ( plugin) ;
728735 }
729- info ! ( "loading plugins..." ) ;
730- for pname in plugins {
731- pm. load_plugin ( pname) ;
732- }
733736
734737 // Run everything!
735738 info ! ( "Executing passes/plugins" ) ;
@@ -745,8 +748,6 @@ fn check_deprecated_options(matches: &getopts::Matches, diag: &errors::Handler)
745748 let deprecated_flags = [
746749 "input-format" ,
747750 "output-format" ,
748- "plugin-path" ,
749- "plugins" ,
750751 "no-defaults" ,
751752 "passes" ,
752753 ] ;
0 commit comments