aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/codegen
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-01-21 13:38:28 +0000
committerGitHub <[email protected]>2021-01-21 13:38:28 +0000
commit0045d7c6db0d9e1e5f88702249c90c096f1882d8 (patch)
tree308cae3f62ce3608385265ce6d885c2e90cffab6 /xtask/src/codegen
parent64a92e2328ed5441fb99344d5f7c410f371414a2 (diff)
parentfeb252138d561075116119d9aa84a21b7244e471 (diff)
Merge #7370
7370: fix mega bug r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'xtask/src/codegen')
-rw-r--r--xtask/src/codegen/gen_assists_docs.rs4
-rw-r--r--xtask/src/codegen/gen_diagnostic_docs.rs2
-rw-r--r--xtask/src/codegen/gen_feature_docs.rs2
3 files changed, 4 insertions, 4 deletions
diff --git a/xtask/src/codegen/gen_assists_docs.rs b/xtask/src/codegen/gen_assists_docs.rs
index 6e18a50a6..51f58180c 100644
--- a/xtask/src/codegen/gen_assists_docs.rs
+++ b/xtask/src/codegen/gen_assists_docs.rs
@@ -4,7 +4,7 @@ use std::{fmt, path::Path};
4 4
5use crate::{ 5use crate::{
6 codegen::{self, extract_comment_blocks_with_empty_lines, reformat, Location, Mode, PREAMBLE}, 6 codegen::{self, extract_comment_blocks_with_empty_lines, reformat, Location, Mode, PREAMBLE},
7 project_root, rust_files, Result, 7 project_root, rust_files_in, Result,
8}; 8};
9 9
10pub fn generate_assists_tests(mode: Mode) -> Result<()> { 10pub fn generate_assists_tests(mode: Mode) -> Result<()> {
@@ -32,7 +32,7 @@ struct Assist {
32impl Assist { 32impl Assist {
33 fn collect() -> Result<Vec<Assist>> { 33 fn collect() -> Result<Vec<Assist>> {
34 let mut res = Vec::new(); 34 let mut res = Vec::new();
35 for path in rust_files(&project_root().join("crates/assists/src/handlers")) { 35 for path in rust_files_in(&project_root().join("crates/assists/src/handlers")) {
36 collect_file(&mut res, path.as_path())?; 36 collect_file(&mut res, path.as_path())?;
37 } 37 }
38 res.sort_by(|lhs, rhs| lhs.id.cmp(&rhs.id)); 38 res.sort_by(|lhs, rhs| lhs.id.cmp(&rhs.id));
diff --git a/xtask/src/codegen/gen_diagnostic_docs.rs b/xtask/src/codegen/gen_diagnostic_docs.rs
index 00aaea5b7..7c14d4a07 100644
--- a/xtask/src/codegen/gen_diagnostic_docs.rs
+++ b/xtask/src/codegen/gen_diagnostic_docs.rs
@@ -27,7 +27,7 @@ struct Diagnostic {
27impl Diagnostic { 27impl Diagnostic {
28 fn collect() -> Result<Vec<Diagnostic>> { 28 fn collect() -> Result<Vec<Diagnostic>> {
29 let mut res = Vec::new(); 29 let mut res = Vec::new();
30 for path in rust_files(&project_root()) { 30 for path in rust_files() {
31 collect_file(&mut res, path)?; 31 collect_file(&mut res, path)?;
32 } 32 }
33 res.sort_by(|lhs, rhs| lhs.id.cmp(&rhs.id)); 33 res.sort_by(|lhs, rhs| lhs.id.cmp(&rhs.id));
diff --git a/xtask/src/codegen/gen_feature_docs.rs b/xtask/src/codegen/gen_feature_docs.rs
index 065dd33f1..61081063b 100644
--- a/xtask/src/codegen/gen_feature_docs.rs
+++ b/xtask/src/codegen/gen_feature_docs.rs
@@ -26,7 +26,7 @@ struct Feature {
26impl Feature { 26impl Feature {
27 fn collect() -> Result<Vec<Feature>> { 27 fn collect() -> Result<Vec<Feature>> {
28 let mut res = Vec::new(); 28 let mut res = Vec::new();
29 for path in rust_files(&project_root()) { 29 for path in rust_files() {
30 collect_file(&mut res, path)?; 30 collect_file(&mut res, path)?;
31 } 31 }
32 res.sort_by(|lhs, rhs| lhs.id.cmp(&rhs.id)); 32 res.sort_by(|lhs, rhs| lhs.id.cmp(&rhs.id));