@@ -164,7 +164,7 @@ pub fn opts() -> Vec<RustcOptGroup> {
164
164
o. optmulti( "" , "extern" , "pass an --extern to rustc" , "NAME=PATH" )
165
165
} ) ,
166
166
stable( "plugin-path" , |o| {
167
- o. optmulti( "" , "plugin-path" , "directory to load plugins from " , "DIR" )
167
+ o. optmulti( "" , "plugin-path" , "removed " , "DIR" )
168
168
} ) ,
169
169
stable( "C" , |o| {
170
170
o. optmulti( "C" , "codegen" , "pass a codegen option to rustc" , "OPT[=VALUE]" )
@@ -177,7 +177,7 @@ pub fn opts() -> Vec<RustcOptGroup> {
177
177
"PASSES" )
178
178
} ) ,
179
179
stable( "plugins" , |o| {
180
- o. optmulti( "" , "plugins" , "space separated list of plugins to also load " ,
180
+ o. optmulti( "" , "plugins" , "removed " ,
181
181
"PLUGINS" )
182
182
} ) ,
183
183
stable( "no-default" , |o| {
@@ -715,9 +715,16 @@ where R: 'static + Send,
715
715
}
716
716
}
717
717
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
+
718
726
// 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 ( ) ;
721
728
for pass in & passes {
722
729
let plugin = match passes:: PASSES . iter ( )
723
730
. position ( |& ( p, ..) | {
@@ -731,10 +738,6 @@ where R: 'static + Send,
731
738
} ;
732
739
pm. add_plugin ( plugin) ;
733
740
}
734
- info ! ( "loading plugins..." ) ;
735
- for pname in plugins {
736
- pm. load_plugin ( pname) ;
737
- }
738
741
739
742
// Run everything!
740
743
info ! ( "Executing passes/plugins" ) ;
@@ -750,8 +753,6 @@ fn check_deprecated_options(matches: &getopts::Matches, diag: &errors::Handler)
750
753
let deprecated_flags = [
751
754
"input-format" ,
752
755
"output-format" ,
753
- "plugin-path" ,
754
- "plugins" ,
755
756
"no-defaults" ,
756
757
"passes" ,
757
758
] ;
0 commit comments