@@ -91,31 +91,6 @@ pub mod test;
9191
9292use clean:: Attributes ;
9393
94- type Pass = ( & ' static str , // name
95- fn ( clean:: Crate ) -> plugins:: PluginResult , // fn
96- & ' static str ) ; // description
97-
98- const PASSES : & ' static [ Pass ] = & [
99- ( "strip-hidden" , passes:: strip_hidden,
100- "strips all doc(hidden) items from the output" ) ,
101- ( "unindent-comments" , passes:: unindent_comments,
102- "removes excess indentation on comments in order for markdown to like it" ) ,
103- ( "collapse-docs" , passes:: collapse_docs,
104- "concatenates all document attributes into one document attribute" ) ,
105- ( "strip-private" , passes:: strip_private,
106- "strips all private items from a crate which cannot be seen externally, \
107- implies strip-priv-imports") ,
108- ( "strip-priv-imports" , passes:: strip_priv_imports,
109- "strips all private import statements (`use`, `extern crate`) from a crate" ) ,
110- ] ;
111-
112- const DEFAULT_PASSES : & ' static [ & ' static str ] = & [
113- "strip-hidden" ,
114- "strip-private" ,
115- "collapse-docs" ,
116- "unindent-comments" ,
117- ] ;
118-
11994struct Output {
12095 krate : clean:: Crate ,
12196 renderinfo : html:: render:: RenderInfo ,
@@ -222,11 +197,11 @@ pub fn main_args(args: &[String]) -> isize {
222197
223198 if matches. opt_strs ( "passes" ) == [ "list" ] {
224199 println ! ( "Available passes for running rustdoc:" ) ;
225- for & ( name, _, description) in PASSES {
200+ for & ( name, _, description) in passes :: PASSES {
226201 println ! ( "{:>20} - {}" , name, description) ;
227202 }
228203 println ! ( "\n Default passes for rustdoc:" ) ;
229- for & name in DEFAULT_PASSES {
204+ for & name in passes :: DEFAULT_PASSES {
230205 println ! ( "{:>20}" , name) ;
231206 }
232207 return 0 ;
@@ -411,7 +386,7 @@ fn rust_input(cratefile: &str, externs: Externs, matches: &getopts::Matches) ->
411386 }
412387
413388 if default_passes {
414- for name in DEFAULT_PASSES . iter ( ) . rev ( ) {
389+ for name in passes :: DEFAULT_PASSES . iter ( ) . rev ( ) {
415390 passes. insert ( 0 , name. to_string ( ) ) ;
416391 }
417392 }
@@ -421,11 +396,11 @@ fn rust_input(cratefile: &str, externs: Externs, matches: &getopts::Matches) ->
421396 . unwrap_or ( "/tmp/rustdoc/plugins" . to_string ( ) ) ;
422397 let mut pm = plugins:: PluginManager :: new ( PathBuf :: from ( path) ) ;
423398 for pass in & passes {
424- let plugin = match PASSES . iter ( )
425- . position ( |& ( p, ..) | {
426- p == * pass
427- } ) {
428- Some ( i) => PASSES [ i] . 1 ,
399+ let plugin = match passes :: PASSES . iter ( )
400+ . position ( |& ( p, ..) | {
401+ p == * pass
402+ } ) {
403+ Some ( i) => passes :: PASSES [ i] . 1 ,
429404 None => {
430405 error ! ( "unknown pass {}, skipping" , * pass) ;
431406 continue
0 commit comments