File tree 4 files changed +7
-9
lines changed
src/tools/compiletest/src
4 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -338,8 +338,8 @@ pub struct Config {
338
338
/// created in `/<build_base>/rustfix_missing_coverage.txt`
339
339
pub rustfix_coverage : bool ,
340
340
341
- /// whether to run `tidy` when a rustdoc test fails
342
- pub has_tidy : bool ,
341
+ /// whether to run `tidy` (html-tidy) when a rustdoc test fails
342
+ pub has_html_tidy : bool ,
343
343
344
344
/// whether to run `enzyme` autodiff tests
345
345
pub has_enzyme : bool ,
Original file line number Diff line number Diff line change @@ -230,14 +230,14 @@ pub fn parse_config(args: Vec<String>) -> Config {
230
230
let run_ignored = matches. opt_present ( "ignored" ) ;
231
231
let with_debug_assertions = matches. opt_present ( "with-debug-assertions" ) ;
232
232
let mode = matches. opt_str ( "mode" ) . unwrap ( ) . parse ( ) . expect ( "invalid mode" ) ;
233
- let has_tidy = if mode == Mode :: Rustdoc {
233
+ let has_html_tidy = if mode == Mode :: Rustdoc {
234
234
Command :: new ( "tidy" )
235
235
. arg ( "--version" )
236
236
. stdout ( Stdio :: null ( ) )
237
237
. status ( )
238
238
. map_or ( false , |status| status. success ( ) )
239
239
} else {
240
- // Avoid spawning an external command when we know tidy won't be used.
240
+ // Avoid spawning an external command when we know html- tidy won't be used.
241
241
false
242
242
} ;
243
243
let has_enzyme = matches. opt_present ( "has-enzyme" ) ;
@@ -336,7 +336,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
336
336
. opt_str ( "compare-mode" )
337
337
. map ( |s| s. parse ( ) . expect ( "invalid --compare-mode provided" ) ) ,
338
338
rustfix_coverage : matches. opt_present ( "rustfix-coverage" ) ,
339
- has_tidy ,
339
+ has_html_tidy ,
340
340
has_enzyme,
341
341
channel : matches. opt_str ( "channel" ) . unwrap ( ) ,
342
342
git_hash : matches. opt_present ( "git-hash" ) ,
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ fn main() {
18
18
19
19
let config = Arc :: new ( parse_config ( env:: args ( ) . collect ( ) ) ) ;
20
20
21
- if !config. has_tidy && config. mode == Mode :: Rustdoc {
21
+ if !config. has_html_tidy && config. mode == Mode :: Rustdoc {
22
22
eprintln ! ( "warning: `tidy` (html-tidy.org) is not installed; diffs will not be generated" ) ;
23
23
}
24
24
Original file line number Diff line number Diff line change 1
- // ignore-tidy-filelength
2
-
3
1
use std:: borrow:: Cow ;
4
2
use std:: collections:: { HashMap , HashSet } ;
5
3
use std:: ffi:: OsString ;
@@ -1897,7 +1895,7 @@ impl<'test> TestCx<'test> {
1897
1895
}
1898
1896
1899
1897
fn compare_to_default_rustdoc ( & mut self , out_dir : & Path ) {
1900
- if !self . config . has_tidy {
1898
+ if !self . config . has_html_tidy {
1901
1899
return ;
1902
1900
}
1903
1901
println ! ( "info: generating a diff against nightly rustdoc" ) ;
You can’t perform that action at this time.
0 commit comments