@@ -24,7 +24,7 @@ use crate::html::markdown::IdMap;
24
24
use crate :: html:: render:: StylePath ;
25
25
use crate :: html:: static_files;
26
26
use crate :: opts;
27
- use crate :: passes:: { self , Condition , DefaultPassOption } ;
27
+ use crate :: passes:: { self , Condition } ;
28
28
use crate :: scrape_examples:: { AllCallLocations , ScrapeExamplesOptions } ;
29
29
use crate :: theme;
30
30
@@ -128,14 +128,6 @@ crate struct Options {
128
128
crate test_builder : Option < PathBuf > ,
129
129
130
130
// 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 > ,
139
131
/// Whether to run the `calculate-doc-coverage` pass, which counts the number of public items
140
132
/// with and without documentation.
141
133
crate show_coverage : bool ,
@@ -192,8 +184,6 @@ impl fmt::Debug for Options {
192
184
. field ( "test_args" , & self . test_args )
193
185
. field ( "test_run_directory" , & self . test_run_directory )
194
186
. field ( "persist_doctests" , & self . persist_doctests )
195
- . field ( "default_passes" , & self . default_passes )
196
- . field ( "manual_passes" , & self . manual_passes )
197
187
. field ( "show_coverage" , & self . show_coverage )
198
188
. field ( "crate_version" , & self . crate_version )
199
189
. field ( "render_options" , & self . render_options )
@@ -605,15 +595,6 @@ impl Options {
605
595
606
596
let show_coverage = matches. opt_present ( "show-coverage" ) ;
607
597
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
-
617
598
let crate_types = match parse_crate_types_from_list ( matches. opt_strs ( "crate-type" ) ) {
618
599
Ok ( types) => types,
619
600
Err ( e) => {
@@ -710,8 +691,6 @@ impl Options {
710
691
lint_cap,
711
692
should_test,
712
693
test_args,
713
- default_passes,
714
- manual_passes,
715
694
show_coverage,
716
695
crate_version,
717
696
test_run_directory,
@@ -769,33 +748,38 @@ impl Options {
769
748
770
749
/// Prints deprecation warnings for deprecated options
771
750
fn 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" ] ;
773
765
774
- for flag in deprecated_flags . iter ( ) {
766
+ for & flag in removed_flags . iter ( ) {
775
767
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) ) ;
777
769
err. note (
778
770
"see issue #44136 <https://github.com/rust-lang/rust/issues/44136> \
779
- for more information",
771
+ for more information",
780
772
) ;
781
773
782
- if * flag == "no-defaults" {
774
+ if flag == "no-defaults" || flag == "passes " {
783
775
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" ) ;
784
778
}
785
779
786
780
err. emit ( ) ;
787
781
}
788
782
}
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
- }
799
783
}
800
784
801
785
/// Extracts `--extern-html-root-url` arguments from `matches` and returns a map of crate names to
0 commit comments