File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -267,6 +267,9 @@ pub fn main_args(args: &[String]) -> isize {
267
267
// Check for unstable options.
268
268
nightly_options:: check_nightly_options ( & matches, & opts ( ) ) ;
269
269
270
+ // check for deprecated options
271
+ check_deprecated_options ( & matches) ;
272
+
270
273
if matches. opt_present ( "h" ) || matches. opt_present ( "help" ) {
271
274
usage ( "rustdoc" ) ;
272
275
return 0 ;
@@ -538,3 +541,16 @@ where R: 'static + Send, F: 'static + Send + FnOnce(Output) -> R {
538
541
} ) ;
539
542
rx. recv ( ) . unwrap ( )
540
543
}
544
+
545
+ /// Prints deprecation warnings for deprecated options
546
+ fn check_deprecated_options ( matches : & getopts:: Matches ) {
547
+ if matches. opt_present ( "input-format" ) ||
548
+ matches. opt_present ( "output-format" ) ||
549
+ matches. opt_present ( "plugin-path" ) ||
550
+ matches. opt_present ( "plugins" ) ||
551
+ matches. opt_present ( "no-defaults" ) ||
552
+ matches. opt_present ( "passes" ) {
553
+ eprintln ! ( "WARNING: this flag is considered deprecated" ) ;
554
+ eprintln ! ( "WARNING: please see https://github.com/rust-lang/rust/issues/44136" ) ;
555
+ }
556
+ }
You can’t perform that action at this time.
0 commit comments