@@ -24,7 +24,7 @@ use crate::html::markdown::IdMap;
2424use crate :: html:: render:: StylePath ;
2525use crate :: html:: static_files;
2626use crate :: opts;
27- use crate :: passes:: { self , Condition , DefaultPassOption } ;
27+ use crate :: passes:: { self , Condition } ;
2828use crate :: scrape_examples:: { AllCallLocations , ScrapeExamplesOptions } ;
2929use crate :: theme;
3030
@@ -128,14 +128,6 @@ crate struct Options {
128128 crate test_builder : Option < PathBuf > ,
129129
130130 // Options that affect the documentation process
131- /// The selected default set of passes to use.
132- ///
133- /// Be aware: This option can come both from the CLI and from crate attributes!
134- crate default_passes : DefaultPassOption ,
135- /// Any passes manually selected by the user.
136- ///
137- /// Be aware: This option can come both from the CLI and from crate attributes!
138- crate manual_passes : Vec < String > ,
139131 /// Whether to run the `calculate-doc-coverage` pass, which counts the number of public items
140132 /// with and without documentation.
141133 crate show_coverage : bool ,
@@ -192,8 +184,6 @@ impl fmt::Debug for Options {
192184 . field ( "test_args" , & self . test_args )
193185 . field ( "test_run_directory" , & self . test_run_directory )
194186 . field ( "persist_doctests" , & self . persist_doctests )
195- . field ( "default_passes" , & self . default_passes )
196- . field ( "manual_passes" , & self . manual_passes )
197187 . field ( "show_coverage" , & self . show_coverage )
198188 . field ( "crate_version" , & self . crate_version )
199189 . field ( "render_options" , & self . render_options )
@@ -605,15 +595,6 @@ impl Options {
605595
606596 let show_coverage = matches. opt_present ( "show-coverage" ) ;
607597
608- let default_passes = if matches. opt_present ( "no-defaults" ) {
609- passes:: DefaultPassOption :: None
610- } else if show_coverage {
611- passes:: DefaultPassOption :: Coverage
612- } else {
613- passes:: DefaultPassOption :: Default
614- } ;
615- let manual_passes = matches. opt_strs ( "passes" ) ;
616-
617598 let crate_types = match parse_crate_types_from_list ( matches. opt_strs ( "crate-type" ) ) {
618599 Ok ( types) => types,
619600 Err ( e) => {
@@ -710,8 +691,6 @@ impl Options {
710691 lint_cap,
711692 should_test,
712693 test_args,
713- default_passes,
714- manual_passes,
715694 show_coverage,
716695 crate_version,
717696 test_run_directory,
@@ -769,33 +748,38 @@ impl Options {
769748
770749/// Prints deprecation warnings for deprecated options
771750fn check_deprecated_options ( matches : & getopts:: Matches , diag : & rustc_errors:: Handler ) {
772- let deprecated_flags = [ "input-format" , "no-defaults" , "passes" ] ;
751+ let deprecated_flags = [ ] ;
752+
753+ for & flag in deprecated_flags. iter ( ) {
754+ if matches. opt_present ( flag) {
755+ diag. struct_warn ( & format ! ( "the `{}` flag is deprecated" , flag) )
756+ . note (
757+ "see issue #44136 <https://github.com/rust-lang/rust/issues/44136> \
758+ for more information",
759+ )
760+ . emit ( ) ;
761+ }
762+ }
763+
764+ let removed_flags = [ "plugins" , "plugin-path" , "no-defaults" , "passes" , "input-format" ] ;
773765
774- for flag in deprecated_flags . iter ( ) {
766+ for & flag in removed_flags . iter ( ) {
775767 if matches. opt_present ( flag) {
776- let mut err = diag. struct_warn ( & format ! ( "the `{}` flag is deprecated " , flag) ) ;
768+ let mut err = diag. struct_warn ( & format ! ( "the `{}` flag no longer functions " , flag) ) ;
777769 err. note (
778770 "see issue #44136 <https://github.com/rust-lang/rust/issues/44136> \
779- for more information",
771+ for more information",
780772 ) ;
781773
782- if * flag == "no-defaults" {
774+ if flag == "no-defaults" || flag == "passes " {
783775 err. help ( "you may want to use --document-private-items" ) ;
776+ } else if flag == "plugins" || flag == "plugin-path" {
777+ err. warn ( "see CVE-2018-1000622" ) ;
784778 }
785779
786780 err. emit ( ) ;
787781 }
788782 }
789-
790- let removed_flags = [ "plugins" , "plugin-path" ] ;
791-
792- for & flag in removed_flags. iter ( ) {
793- if matches. opt_present ( flag) {
794- diag. struct_warn ( & format ! ( "the '{}' flag no longer functions" , flag) )
795- . warn ( "see CVE-2018-1000622" )
796- . emit ( ) ;
797- }
798- }
799783}
800784
801785/// Extracts `--extern-html-root-url` arguments from `matches` and returns a map of crate names to
0 commit comments