@@ -165,7 +165,7 @@ pub fn opts() -> Vec<RustcOptGroup> {
165
165
o. optmulti( "" , "extern" , "pass an --extern to rustc" , "NAME=PATH" )
166
166
} ) ,
167
167
stable( "plugin-path" , |o| {
168
- o. optmulti( "" , "plugin-path" , "directory to load plugins from " , "DIR" )
168
+ o. optmulti( "" , "plugin-path" , "removed " , "DIR" )
169
169
} ) ,
170
170
stable( "C" , |o| {
171
171
o. optmulti( "C" , "codegen" , "pass a codegen option to rustc" , "OPT[=VALUE]" )
@@ -178,7 +178,7 @@ pub fn opts() -> Vec<RustcOptGroup> {
178
178
"PASSES" )
179
179
} ) ,
180
180
stable( "plugins" , |o| {
181
- o. optmulti( "" , "plugins" , "space separated list of plugins to also load " ,
181
+ o. optmulti( "" , "plugins" , "removed " ,
182
182
"PLUGINS" )
183
183
} ) ,
184
184
stable( "no-default" , |o| {
@@ -741,9 +741,16 @@ where R: 'static + Send,
741
741
}
742
742
}
743
743
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
+
744
752
// 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 ( ) ;
747
754
for pass in & passes {
748
755
let plugin = match passes:: PASSES . iter ( )
749
756
. position ( |& ( p, ..) | {
@@ -757,10 +764,6 @@ where R: 'static + Send,
757
764
} ;
758
765
pm. add_plugin ( plugin) ;
759
766
}
760
- info ! ( "loading plugins..." ) ;
761
- for pname in plugins {
762
- pm. load_plugin ( pname) ;
763
- }
764
767
765
768
// Run everything!
766
769
info ! ( "Executing passes/plugins" ) ;
@@ -776,8 +779,6 @@ fn check_deprecated_options(matches: &getopts::Matches, diag: &errors::Handler)
776
779
let deprecated_flags = [
777
780
"input-format" ,
778
781
"output-format" ,
779
- "plugin-path" ,
780
- "plugins" ,
781
782
"no-defaults" ,
782
783
"passes" ,
783
784
] ;
0 commit comments