File tree 3 files changed +18
-7
lines changed 3 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,11 @@ r#####"
53
53
) ;
54
54
}
55
55
56
+ // Do not generate assists manual when run with `--check`
57
+ if check {
58
+ return ;
59
+ }
60
+
56
61
{
57
62
// Generate assists manual. Note that we do _not_ commit manual to the
58
63
// git repo. Instead, `cargo xtask release` runs this test before making
Original file line number Diff line number Diff line change @@ -10,13 +10,15 @@ use crate::{
10
10
11
11
pub ( crate ) fn generate ( check : bool ) {
12
12
let diagnostics = Diagnostic :: collect ( ) . unwrap ( ) ;
13
- if !check {
14
- let contents =
15
- diagnostics. into_iter ( ) . map ( |it| it. to_string ( ) ) . collect :: < Vec < _ > > ( ) . join ( "\n \n " ) ;
16
- let contents = add_preamble ( crate :: flags:: CodegenType :: DiagnosticsDocs , contents) ;
17
- let dst = project_root ( ) . join ( "docs/book/src/diagnostics_generated.md" ) ;
18
- fs:: write ( dst, contents) . unwrap ( ) ;
13
+ // Do not generate docs when run with `--check`
14
+ if check {
15
+ return ;
19
16
}
17
+ let contents =
18
+ diagnostics. into_iter ( ) . map ( |it| it. to_string ( ) ) . collect :: < Vec < _ > > ( ) . join ( "\n \n " ) ;
19
+ let contents = add_preamble ( crate :: flags:: CodegenType :: DiagnosticsDocs , contents) ;
20
+ let dst = project_root ( ) . join ( "docs/book/src/diagnostics_generated.md" ) ;
21
+ fs:: write ( dst, contents) . unwrap ( ) ;
20
22
}
21
23
22
24
#[ derive( Debug ) ]
Original file line number Diff line number Diff line change @@ -8,8 +8,12 @@ use crate::{
8
8
util:: list_rust_files,
9
9
} ;
10
10
11
- pub ( crate ) fn generate ( _check : bool ) {
11
+ pub ( crate ) fn generate ( check : bool ) {
12
12
let features = Feature :: collect ( ) . unwrap ( ) ;
13
+ // Do not generate docs when run with `--check`
14
+ if check {
15
+ return ;
16
+ }
13
17
let contents = features. into_iter ( ) . map ( |it| it. to_string ( ) ) . collect :: < Vec < _ > > ( ) . join ( "\n \n " ) ;
14
18
let contents = add_preamble ( crate :: flags:: CodegenType :: FeatureDocs , contents) ;
15
19
let dst = project_root ( ) . join ( "docs/book/src/features_generated.md" ) ;
You can’t perform that action at this time.
0 commit comments