diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-10-20 10:46:43 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-10-20 10:46:43 +0100 |
commit | 4c00bdea675d33d578cff1c0d7cc3967303e6653 (patch) | |
tree | bc1cd5b714e9566e2c87f33582d8c587cf46f6c0 /xtask/src/codegen/gen_feature_docs.rs | |
parent | 378dd90bab65fa6df078444c3932118105a460b8 (diff) | |
parent | b8a74e03708819c04862005ad0a91757dd63d654 (diff) |
Merge #6266
6266: Generate diagnostics docs r=matklad a=popzxc
Resolves #6215
Co-authored-by: Igor Aleksanov <[email protected]>
Diffstat (limited to 'xtask/src/codegen/gen_feature_docs.rs')
-rw-r--r-- | xtask/src/codegen/gen_feature_docs.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xtask/src/codegen/gen_feature_docs.rs b/xtask/src/codegen/gen_feature_docs.rs index 341e67c73..065dd33f1 100644 --- a/xtask/src/codegen/gen_feature_docs.rs +++ b/xtask/src/codegen/gen_feature_docs.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | //! Generates `assists.md` documentation. | 1 | //! Generates `assists.md` documentation. |
2 | 2 | ||
3 | use std::{fmt, fs, path::PathBuf}; | 3 | use std::{fmt, path::PathBuf}; |
4 | 4 | ||
5 | use crate::{ | 5 | use crate::{ |
6 | codegen::{self, extract_comment_blocks_with_empty_lines, Location, Mode, PREAMBLE}, | 6 | codegen::{self, extract_comment_blocks_with_empty_lines, Location, Mode, PREAMBLE}, |
@@ -33,7 +33,7 @@ impl Feature { | |||
33 | return Ok(res); | 33 | return Ok(res); |
34 | 34 | ||
35 | fn collect_file(acc: &mut Vec<Feature>, path: PathBuf) -> Result<()> { | 35 | fn collect_file(acc: &mut Vec<Feature>, path: PathBuf) -> Result<()> { |
36 | let text = fs::read_to_string(&path)?; | 36 | let text = xshell::read_file(&path)?; |
37 | let comment_blocks = extract_comment_blocks_with_empty_lines("Feature", &text); | 37 | let comment_blocks = extract_comment_blocks_with_empty_lines("Feature", &text); |
38 | 38 | ||
39 | for block in comment_blocks { | 39 | for block in comment_blocks { |