File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 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 {
267267 // Check for unstable options.
268268 nightly_options:: check_nightly_options ( & matches, & opts ( ) ) ;
269269
270+ // check for deprecated options
271+ check_deprecated_options ( & matches) ;
272+
270273 if matches. opt_present ( "h" ) || matches. opt_present ( "help" ) {
271274 usage ( "rustdoc" ) ;
272275 return 0 ;
@@ -538,3 +541,16 @@ where R: 'static + Send, F: 'static + Send + FnOnce(Output) -> R {
538541 } ) ;
539542 rx. recv ( ) . unwrap ( )
540543}
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