aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/codegen/gen_feature_docs.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-10-20 10:46:43 +0100
committerGitHub <[email protected]>2020-10-20 10:46:43 +0100
commit4c00bdea675d33d578cff1c0d7cc3967303e6653 (patch)
treebc1cd5b714e9566e2c87f33582d8c587cf46f6c0 /xtask/src/codegen/gen_feature_docs.rs
parent378dd90bab65fa6df078444c3932118105a460b8 (diff)
parentb8a74e03708819c04862005ad0a91757dd63d654 (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.rs4
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
3use std::{fmt, fs, path::PathBuf}; 3use std::{fmt, path::PathBuf};
4 4
5use crate::{ 5use 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 {