@@ -162,6 +162,18 @@ pub fn main_args(args: &[String]) -> int {
162162 }
163163 }
164164
165+ if matches. opt_strs ( "passes" ) . as_slice ( ) == & [ "list" . to_string ( ) ] {
166+ println ! ( "Available passes for running rustdoc:" ) ;
167+ for & ( name, _, description) in PASSES . iter ( ) {
168+ println ! ( "{:>20s} - {}" , name, description) ;
169+ }
170+ println ! ( "{}" , "\n Default passes for rustdoc:" ) ; // FIXME: #9970
171+ for & name in DEFAULT_PASSES . iter ( ) {
172+ println ! ( "{:>20s}" , name) ;
173+ }
174+ return 0 ;
175+ }
176+
165177 if matches. free . len ( ) == 0 {
166178 println ! ( "expected an input file to act on" ) ;
167179 return 1 ;
@@ -212,18 +224,6 @@ pub fn main_args(args: &[String]) -> int {
212224 ( false , false ) => { }
213225 }
214226
215- if matches. opt_strs ( "passes" ) . as_slice ( ) == & [ "list" . to_string ( ) ] {
216- println ! ( "Available passes for running rustdoc:" ) ;
217- for & ( name, _, description) in PASSES . iter ( ) {
218- println ! ( "{:>20s} - {}" , name, description) ;
219- }
220- println ! ( "{}" , "\n Default passes for rustdoc:" ) ; // FIXME: #9970
221- for & name in DEFAULT_PASSES . iter ( ) {
222- println ! ( "{:>20s}" , name) ;
223- }
224- return 0 ;
225- }
226-
227227 let ( krate, res) = match acquire_input ( input, externs, & matches) {
228228 Ok ( pair) => pair,
229229 Err ( s) => {
0 commit comments