aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/codegen.rs
diff options
context:
space:
mode:
Diffstat (limited to 'xtask/src/codegen.rs')
-rw-r--r--xtask/src/codegen.rs14
1 files changed, 5 insertions, 9 deletions
diff --git a/xtask/src/codegen.rs b/xtask/src/codegen.rs
index adea053b6..2f56c5ad0 100644
--- a/xtask/src/codegen.rs
+++ b/xtask/src/codegen.rs
@@ -18,9 +18,9 @@ use std::{
18}; 18};
19use xshell::{cmd, pushenv, read_file, write_file}; 19use xshell::{cmd, pushenv, read_file, write_file};
20 20
21use crate::{ensure_rustfmt, project_root, Result}; 21use crate::{ensure_rustfmt, flags, project_root, Result};
22 22
23pub use self::{ 23pub(crate) use self::{
24 gen_assists_docs::{generate_assists_docs, generate_assists_tests}, 24 gen_assists_docs::{generate_assists_docs, generate_assists_tests},
25 gen_diagnostic_docs::generate_diagnostic_docs, 25 gen_diagnostic_docs::generate_diagnostic_docs,
26 gen_feature_docs::generate_feature_docs, 26 gen_feature_docs::generate_feature_docs,
@@ -30,17 +30,13 @@ pub use self::{
30}; 30};
31 31
32#[derive(Debug, PartialEq, Eq, Clone, Copy)] 32#[derive(Debug, PartialEq, Eq, Clone, Copy)]
33pub enum Mode { 33pub(crate) enum Mode {
34 Overwrite, 34 Overwrite,
35 Verify, 35 Verify,
36} 36}
37 37
38pub struct CodegenCmd { 38impl flags::Codegen {
39 pub features: bool, 39 pub(crate) fn run(self) -> Result<()> {
40}
41
42impl CodegenCmd {
43 pub fn run(self) -> Result<()> {
44 if self.features { 40 if self.features {
45 generate_lint_completions(Mode::Overwrite)?; 41 generate_lint_completions(Mode::Overwrite)?;
46 } 42 }